Questions how to ensure EA is constantly checking current price - page 3

 

Its not meant that way. I will share it, but in another way and any developer here will participate of my work if he wants. Sounds weird again but its also not meant weird. I will drop you and Alan a PN. 

Edit: And by the way, I shared much more code here as I received for own usage. 

 
Just to be complete on the "missing ticks" subject and as this forum is named mql5.com, in mql5 we have the CopyTicks() function, which allow to retrieve ALL ticks data, even the ones where OnTick() was dropped.
Documentation on MQL5: Timeseries and Indicators Access / CopyTicks
Documentation on MQL5: Timeseries and Indicators Access / CopyTicks
  • www.mql5.com
Timeseries and Indicators Access / CopyTicks - Reference on algorithmic/automated trading language for MetaTrader 5
 

Hi all,

This is my forward test with my EA on demo

 i don't understand how can the buy price be higher than the entire bar itself 

 i got the feedback from broker. Even with live acc is possible if spread is high that time because the MT4 price is always only bid price, not transacted price. is that true? 

Files:
 
Yes of course its true. The chart shows the bid and when you buy, the order gets filled at the ask. No matter if your order is a market or stop or limit, visually its never "correct" with any buy order, same as TP and SL with short positions. 
 
Doerk Hilger:
Yes of course its true. The chart shows the bid and when you buy, the order gets filled at the ask. No matter if your order is a market or stop or limit, visually its never "correct" with any buy order, same as TP and SL with short positions. 

thanks for the confirmation

no wonder when i was checking my EA action, it doesn't make any sense 

 

ma2 = iMA(Symbol(), 0, MA_Period1, MA_Shift1, MA_Method1, Applied_Price1, 1);

 

i was using the iMA within the OnTick domain. When the tick price changed, the iMA value didn't change. i am using the close price value

 at the same time i have the MA indi on my chart and it is fluctuating 

 any idea? 

 
tanwt:

ma2 = iMA(Symbol(), 0, MA_Period1, MA_Shift1, MA_Method1, Applied_Price1, 1);

 

i was using the iMA within the OnTick domain. When the tick price changed, the iMA value didn't change. i am using the close price value

 at the same time i have the MA indi on my chart and it is fluctuating 

 any idea? 

found the issue. i accidentally coded the shift to 1. lol
Reason: