Backtest not triggering TP

 

Hi everyone!

I'm running my backtest and when I go tick by tick, I can see the Sell Order get created, and I see the TP line, but when the bar crosses that, it doesn't trigger it. 

Has anyone experienced this before?

I attached screenshot.


Thanks everyone!

Files:
Capture.PNG  17 kb
 
is the issue repeatable ?
try to use fix spread.
 
carloscordon82: the Sell Order get created, and I see the TP line, but when the bar crosses that, it doesn't trigger it.
You buy at the Ask and sell at the Bid. So for buy orders you pay the spread on open. For sell orders you pay the spread on close.
  1. Your buy order's TP/SL (or Sell Stop's/Sell Limit's entry) are triggered when the Bid reaches it. Not the Ask. Your SL is shorter by the spread and your TP would be longer. Don't you want the same/specified amount for either direction?
  2. Your sell order's TP/SL (or Buy Stop's/Buy Limit's entry) will be triggered when the Ask reaches it. To trigger at a specific Bid price, add the average spread.
              MODE_SPREAD (Paul) - MQL4 programming forum - Page 3 #25
  3. The charts show Bid prices only. Turn on the Ask line to see how big the spread is (Tools → Options (control+O) → charts → Show ask line.)
Reason: