Hi,
i need some help comparing two elements of MA. Usually i have no problem with this,but this time is different.
This is how i assign value to the buffer.
I need as simple as
to set as filter for opening trades, i have worked multiple times with this, but this time does not work.
For example i set for buy ma1>ma2, but it still opens buy on the opposite signal, when i print the values the really seem to increase, but when i look to the chart the values are different.
So i believe it get wrong values for the current and the "MAdirectoinPeriod-1"-th bar. Do you know what needs to be changed?
Btw i tried with and without ArraySetAsSeries, no effect
never normalize
why normalize?
never normalize
in both cases didnt work, i did it because it showed a big string of numbers after the decimal, i hoped it could help, but i guess there was no point in it
in both cases didnt work, i did it because it showed a big string of numbers after the decimal, i hoped it could help, but i guess there was no point in it
still NEVER normalize anything. not needed. just compare non-normalized doubles, or compare them the right way.
to get rid of those long chain of numbers, use DoubleToString(), when printing.
still NEVER normalize anything. not needed. just compare non-normalized doubles, or compare them the right way.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
i need some help comparing two elements of MA. Usually i have no problem with this,but this time is different.
This is how i assign value to the buffer.
I need as simple as
to set as filter for opening trades, i have worked multiple times with this, but this time does not work.
For example i set for buy ma1>ma2, but it still opens buy on the opposite signal, when i print the values the really seem to increase, but when i look to the chart the values are different.
So i believe it get wrong values for the current and the "MAdirectoinPeriod-1"-th bar. Do you know what needs to be changed?
Btw i tried with and without ArraySetAsSeries, no effect