Is it possible for you to convert pair trade indicator Indicators - PairsTrade_Light - MQL5 Code Base into mql4?Thank you.
Will check it (at a first glance there seem to be some stuff that migh be a cause for wrong calculcation - repainting - but I need to check the code thoroughly)
Immediately one thing : disregard levels crossing in the past. Those levels are changed all the time
I see , 0 level is not changing as far as I see , am I correct?
Level as level is not changing, the other two levels are
Right now I am in a process of deciphering what was the exact intention of the coder and some coding points are very disputable (the way how ema smoothing is done immediately becomes a thorn in the eye - I am not sure at all that it will produce results that are ot subject of change, but will know more later
I think author's smoothing algorithm based on his articles Time Series Forecasting Using Exponential Smoothing (continued) - MQL5 Articles in mql5 site
Maybe he is telling about that, but what is used is a simple EMA smoothing in the code. Here is one code part doing that :
sy1_f=af*pr1+bf*sy1_f; // Fast EMA
sy1_ff=af*sy1_f+bf*sy1_ff; // Repeated fast EMA from the previous
sy1_atr=aa*tr1+ba*sy1_atr; // ATR with using EMA[/PHP]
and this is how the coefficients are calculated :
[PHP] as=2.0/(1+EMA_Slow); bs=1.0-as; // Slow EMA coefficients
af=2.0/(1+EMA_Fast); bf=1.0-af; // Fast EMA coefficients
those are classical EMA coefficients
What do you think, pairtrade indicator calculated wrong?Or is it codeable?Thanks.
In my opinion the author of that indicator should completely recode it. Not going to go into details about the code, but there is simply too much stuff in it that code that should not be done the way it was done at all.
Other than that, those are simply 2 MACD lines drawn (with some lag added due to additional EMA smoothing of the fast value) in the same window and the difference of it drawn as a third value
I want this ea to work in 5 digit broker
4 digit broker roboforex is working fine
Thanks in advance
the ea was deleted cause it is a decompile code