If this code is in start() and you are running it for every tick then it will print the same message for every tick . . it may change when you get a new bar . . . perhaps you should run this code at the start of a new bar ?
RaptorUK:
If this code is in start() and you are running it for every tick then it will print the same message for every tick . . it may change when you get a new bar . . . perhaps you should run this code at the start of a new bar ?
If this code is in start() and you are running it for every tick then it will print the same message for every tick . . it may change when you get a new bar . . . perhaps you should run this code at the start of a new bar ?
Yeah I am running it at the start()..
How do I make it run for every new bar?
RaptorUK:
If this code is in start() and you are running it for every tick then it will print the same message for every tick . . it may change when you get a new bar . . . perhaps you should run this code at the start of a new bar ?
If this code is in start() and you are running it for every tick then it will print the same message for every tick . . it may change when you get a new bar . . . perhaps you should run this code at the start of a new bar ?
Also it seems like this code isn't getting the right amount of decimals..
How do I get a larger amount of decimals in my double variables?
Hi YoungMoney,
Try this ?
if (CurrentAC > PreviousAC) { Print("AC is Green"); } else { if (CurrentAC < PreviousAC) { Print("AC is Red"); } else { Print ("AC is L.O.L"); } }
Who knows it won't work
:D

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
Hi guys!!
I planned to use the AC indicator in my EA. I want to know if the current bar on the AC is green or red. I also found out that it is green if the current value is of higher value than the previous bar. Which also means that the bar will be red if the current bar has lesser value than the previous bar.
This is the code I was using :
After that code I compare the too with each other:
When I run this EA it prints that the AC is Red every single time. It seems like it has difficulties either getting the previous value of AC or comparing the two double variables with each other.
Can you guys give me a hand on this one? Would really appreciate if somebody could help me getting this EA done!
Thanks
YoungMoney