93412How do you know it's doing this? Trades are shut by stoplosses and takeprofits, not by the EA.
93412How do you know it's doing this? Trades are shut by stoplosses and takeprofits, not by the EA.
93412The disperse is 3 thus have raised TP from 14 to 17 and diminished the SL from 30 to 27 to select the spread into account and that I get similar results in backtests.
Edit: This of course Doesn't Work. There's still a few pips that is un accounted for each trade. The big issue is how frequently would the EA reach goal versus stop loss when the spread has been accounted for.
The backtester doesn't understand the difference! The EA must be told to shut on the proper Ask/Buy, or it will simply shut where you tell it to (and not deduct spread.) I understand because I've examined the results both ways. Additionally, it only makes sense when you consider it.
Is that 189 billion dollar EA presently in jeoprody? Alright, we'll have to settle for 18.9 billion...
93412My EAs have a separate close loop that reference the bid/ask prices. You are welcome to check.
It'd be interesting to find out which price (bid/ask) the EA uses when running in the backtester. How do you recommend I go about doing this?
93412Maybe this will help you:
void closeAll()
while(OrdersTotal()gt;0)
OrderSelect(0, SELECT_BY_POS);
if(OrderType()==OP_BUY)
OrderClose(OrderTicket(), OrderLots(), Bid, 0, Blue);
if(OrderType()==OP_SELL)
OrderClose(OrderTicket(), OrderLots(), Ask, 0, Blue);
Should you use this same code, but utilize Ask for your OP_BUY and Bid for your OP_SELL, you'll be blowing spreads. This is exactly what gambler's EA is currently performing.
All you need to do is run it either way, and compare the results. (I advise looking line by line in the ledger...)
93412Now it's changed to OrderSend(Symbol(),OP_BUY,Lots,Ask,4,Bid - SL * Stage, Bid TP * Stage,0,Magic,0,Green); and OrderSend(Symbol(),OP_SELL,Lots,Bid,4,Ask SL * Stage,Ask - TP * Stage,0,Magic,0,Red); and I get similar results. Have I done it right?