Oh I think I see what's going on...
The indicator is dependent on all previous bars to get to where it is right now. If I drop it on the chart after the fact, then it's starting on a different bar all together. No wonder the values are all different.
It's doing what it should. That's just the nature of the indi.
Thanks.
Hiltos: No wonder the values are all different. LastStatic = iBarShift(NULL,0,LastTime); prevStatic = StaticMABuffer[i + 1]; |
|

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Good Morning,
I'm testing an indicator with an EA (using iCustom). There's only one buffer. Basically the indicator will cross back and forth across a zero value. If the indicator is positive, I'll buy. If it's negative, I'll sell.
My trouble is that when I run the EA and indicator in visual mode the indicator will give me one set of values. And then I add the same indicator with the same inputs after the EA runs will give me a different set of values.
The entire code of the indicator:
The entire code of the EA: (Note there is a hidden takeprofit and stoploss so I can use them on new bars only. And this is only a rough draft.)
Thanks in advance for any advice you can offer!