DislikedOB...can you post the set file .. may be easier to load up take a lookIgnored
I changed it to a .txt but you can always change it back to .set if you want to load it up on your EA.
Much thanks,
OB
Attached File(s)
Nanningbob 4h trading system ver. 5.0 4,432 replies
Nanningbob 60x90 EA 3,920 replies
Help regarding NanningBob EA 27 replies
Nanningbob 4H trading system 2,017 replies
Help to improve profitable EA - 1H NanningBob 40MA 200 BB 10 replies
DislikedOB...can you post the set file .. may be easier to load up take a lookIgnored
DislikedSure thing. When I looked at your set file it was using ATR. So I figured that was why you got the T/P.
I changed it to a .txt but you can always change it back to .set if you want to load it up on your EA.
Much thanks,
OBIgnored
DislikedOB,
I suspect this is a result of your hiddentakeprofit setting (i.e. = 20). I would assume you need to set it to true to have it affect your order, but I'm not sure. That could be a bug.
The BollingerBands /ATR/ Sixths take profit settings only work on on the initial order - not during trade management. So you'll see the result with your initial order entry. Any trade management settings will also affect the order, so I assume take profit on the order will be whichever is hit first.
cheers
SimonIgnored
DislikedHmm, my hiddentakeprofit = false meaning that it's not suppose to hide my T/P. I noticed on your ATR settings that you also had it on false. I'm so confused.Ignored
DislikedI'm also confused. The take profit settings for BollingerBands, ATR and Sixths ONLY affect the initial order. So if you don't see a take profit value on your initial order those settings can't close your order.
I really have no idea what's been closing your orders!
cheers
SimonIgnored
DislikedThanks for pointing this out. I'll certainly have a look how I can optimise my version of the NB EA.
cheers
SimonIgnored
DislikedIf you want to write a Nanningbob style EA and you subscribe to the KISS philosophy, here's a rundown on how I would do it.
EA Should have TWO modes:...Ignored
DislikedWhite Line Closure = true I think this has been closing his orders. Especially those odd number closuresIgnored
DislikedI think you've got the explanation. OB - whiteline closure has probably been closing your trades.
f451Ignored
DislikedAh thank you guys! That makes the most sense. I'm assuming the white line closure is when the white stoch line crosses the blue line above my set points (the default ones were 75 and 25)? So like on a buy once it crosses the 75 and the white and blue crisscross is where it exits?Ignored
//+------------------------------------------------------------------+
//| WPR Sixth Trader EA V0.01 by Zurathustra |
//| |
//| The concept behind this EA is to enter trades on the cross of |
//| WPR above or below certain levels, and then close those trades |
//| incrementally as WPR continues its move. Ideally this will get |
//| you into a trend at its start and allow you to stay in it until |
//| it nears its end. |
//| |
//| WARNING!!! THIS EA IS IN EXTREMELY EARLY DEVOLOPEMENT STAGES! |
//| THIS EA WILL BLOW ALL THE MONEY IN YOUR ACCOUNT LEAVING YOU |
//| BROKE, DIVORCED, AND HOMELESS. IT WILL THEN TRACK YOU DOWN AND |
//| KILL YOUR PETS AND ANALLY RAPE YOU! DO NOT USE IT ON A LIVE |
//| ACCOUNT UNDER ANY CIRCUMSTANCES!! YOU HAVE BEEN WARNED!! |
//| |
//+------------------- DO NOT REMOVE THIS HEADER --------------------+
extern int MagicNumber = 1977429;
extern double Trade1Lots = 0.01;
//extern double Trade2Lots = 0.01;
//extern double Trade3Lots = 0.01;
//extern double Trade4Lots = 0.01;
extern double Periods = 120;
extern int Slippage = 3;
//define Wait 0
//define Buy 1
//define Sell 2
string SMode = "Wait";
int Mode = 0;
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start() {
//+------------------------------------------------------------------+
//| Variables |
//+------------------------------------------------------------------+
double WPR = iWPR(NULL, 0, Periods, 0);
int Total = OrdersTotal();
//+------------------------------------------------------------------+
//| Trade Logic |
//+------------------------------------------------------------------+
if (iWPR(NULL, 0, Periods, 0) < -80){
SMode = "Buy";
Mode = 1;
}
if (iWPR(NULL, 0, Periods, 0) > -20){
SMode = "Sell";
Mode = 2;
}
//+------------------------------------------------------------------+
//| Closing Trades |
//+------------------------------------------------------------------+
bool IsTrade = False;
for (int i = 0; i < Total; i ++) {
OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
if(OrderType() <= OP_SELL && OrderSymbol() == Symbol()) {
IsTrade = True;
//+---------------------------------------------------------+
// Buy Trades |
//+---------------------------------------------------------+
if (OrderType() == OP_BUY){
if (iWPR(NULL, 0, Periods, 0) < -80 || iWPR(NULL, 0, Periods, 0) > -20){
OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, MediumSeaGreen);
IsTrade = false;
Mode = 0;
SMode = "Wait";
}
}
//+---------------------------------------------------------+
// Sell Trades |
//+---------------------------------------------------------+
if (OrderType() == OP_SELL){
if (iWPR(NULL, 0, Periods, 0) < -80 || iWPR(NULL, 0, Periods, 0) > -20){
OrderClose(OrderTicket(), OrderLots(), Ask, Slippage, DarkOrange);
IsTrade = false;
Mode = 0;
SMode = "Wait";
}
}
}
}
//+------------------------------------------------------------------+
//| Buying |
//+------------------------------------------------------------------+
if (Mode == 1){
if (!IsTrade){
if (iWPR(NULL, 0, Periods, 0) > -80){
OrderSend(Symbol(), OP_BUY, Trade1Lots, Ask, Slippage, 0, 0, "Buy(#" + MagicNumber + ")", MagicNumber, 0, DodgerBlue);
Mode = 0;
SMode = "In Trade";
}
}
}
//+------------------------------------------------------------------+
//| Selling |
//+------------------------------------------------------------------+
if (Mode == 2){
if (!IsTrade){
if (iWPR(NULL, 0, Periods, 0) < -20){
OrderSend(Symbol(), OP_SELL, Trade1Lots, Bid, Slippage, 0, 0, "Sell(#" + MagicNumber + ")", MagicNumber, 0, DeepPink);
Mode = 0;
SMode = "In Trade";
}
}
}
//+------------------------------------------------------------------+
//| Comments |
//+------------------------------------------------------------------+
Comment("Mode = ", (SMode), "n", "WPR = ", (WPR), "n", "Ask = ", Ask, "n", "Bid = ", Bid );
//+------------------------------------------------------------------+
//| End of Program |
//+------------------------------------------------------------------+
} DislikedSpecial callout to Macman and other serious back and forward testers:
If you can take the time to run this as a direct comparison with NB v5, (and I do most certainly understand the additional mental/demo space/administrative effort required here) I would be deeply grateful. An apples with apples comparison would enable us to determine if and by how much this approach reduces floating drawdown on NB's system, with all the attendant benefits that implies - such as the ability to use larger lot sizes and greater leverage. Optimisation around overbought...Ignored