I don't say
Nanningbob 4h trading system ver. 5.0 4,432 replies
Nanningbob 60x90 EA 3,920 replies
Require help amending Nanningbob v10 EA 0 replies
Help regarding NanningBob EA 27 replies
Nanningbob 4H trading system 2,017 replies
DislikedSorry, guys
Have done the suggested additions into code, tested it with Hedge enabled and without it, but I have to report:
Luc is still there!Ignored
DislikedI have been trying to post a *.set file so someone could review the settings and help clear something up for me, but when I try to attach the file I get an error saying it is an invalid file?Ignored
DislikedHello,
BB has just opened multiple hedge trade. Is that what suppose to be done?Ignored
DislikedIf I could, I would. Not a clue why the stuff doesn't work. For now, you will have to intervene manually.
That is the trouble with bolting stuff onto a system that was not designed to cope with it; it causes trouble.
Ignored
//Hedging instead of closure if (CloseTrade && UseHedging && !HedgingInProgress && OrderProfit() < 0) { double SendLots = OrderLots() * HedgeLotMultiplier; RefreshRates(); if (OrderType() == OP_BUY) { result = SendSingleTrade(OP_SELL, HedgeTradeComment, SendLots, NormalizeDouble(Bid, Digits), 0, 0); [color=Red] if (result) { //Delete outstanding pendings if (UseCarolco && (NoOfPendingBuys > 0 || NoOfPendingSells > 0 ) ) { DeletePendings(); CountOpenTrades();//Forces startcarolco() to do a rerun if any deletions fail. cot resets all the xxxOpen variables. return;//Attempt to stop multiple hedge trades being taken }//if (UseCarolco) }//if (result) [/color] }//if (OrderType() == OP_BUY) if (OrderType() == OP_SELL) { result = SendSingleTrade(OP_BUY, HedgeTradeComment, SendLots, NormalizeDouble(Ask, Digits), 0, 0); [color=Red] if (result) { //Delete outstanding pendings if (UseCarolco && (NoOfPendingBuys > 0 || NoOfPendingSells > 0 ) ) { DeletePendings(); CountOpenTrades();//Forces startcarolco() to do a rerun if any deletions fail. cot resets all the xxxOpen variables. return;//Attempt to stop multiple hedge trades being taken }//if (UseCarolco) }//if (result) [/color] }//if (OrderType() == OP_SELL)
//Hedging instead of closure if (CloseTrade && UseHedging && !HedgingInProgress && OrderProfit() < 0) { double SendLots = OrderLots() * HedgeLotMultiplier; RefreshRates(); if (OrderType() == OP_BUY) { result = SendSingleTrade(OP_SELL, HedgeTradeComment, SendLots, NormalizeDouble(Bid, Digits), 0, 0); [color=Red]if (result) { //Delete outstanding pendings if (UseCarolco && (NoOfPendingBuys > 0 || NoOfPendingSells > 0 ) ) { DeletePendings(); CountOpenTrades();//Forces startcarolco() to do a rerun if any deletions fail. cot resets all the xxxOpen variables. }//if (UseCarolco) return;//Attempt to stop multiple hedge trades being taken }//if (result) }/[/color]/if (OrderType() == OP_BUY) if (OrderType() == OP_SELL) { result = SendSingleTrade(OP_BUY, HedgeTradeComment, SendLots, NormalizeDouble(Ask, Digits), 0, 0); [color=Red] if (result) { //Delete outstanding pendings if (UseCarolco && (NoOfPendingBuys > 0 || NoOfPendingSells > 0 ) ) { DeletePendings(); CountOpenTrades();//Forces startcarolco() to do a rerun if any deletions fail. cot resets all the xxxOpen variables. }//if (UseCarolco) return;//Attempt to stop multiple hedge trades being taken }//if (result) [/color] }//if (OrderType() == OP_SELL) }//if (CloseTrade && UseHedging && !HedgingInProgress)
if (!OrderSelect(TicketNo, SELECT_BY_TICKET) ) return; if (OrderSelect(TicketNo, SELECT_BY_TICKET) && OrderCloseTime() > 0) return;
All well and good until a range trade turns into a trend trade and the hedging process is repeated as I describe above, and I am left with a * 8 lots hedge. Mind, it will not take many pips to bring the pair to breakeven.
How likely it is that this will happen is anybody's guess. I suppose it is worthwhile remembering my oft-repeated mantra: if it can happen and it is bad for you, it will happen.
Something to make a mental note of in the future.
DislikedSteve,
Was that hedging code copied from MPTM? I just had MPTM fire off 6 hedge trades for 1 EURUSD position 6 minutes ago on a NB10 1hr demo.Ignored