You just need a small mod to your code . . .
datetime timeprev=0; int start() { if(timeprev!=Time[0]) { variable = iCustom( . . . . . ); timeprev=Time[0]; } // code that is executed for every tick goes here return(0); } // end of start()
Of course it was right in front of me... :-) Once again you guys are awesome!

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
I'm using bar closes to signal an entry on my EA. Once in the position I want to monitor the position by tick so I can adjust a trailing stop.
Currently I'm using the following code in the EA to so I can get a signal on a close from a function that looks at an iCustom indicator. Is there another way to call the function and check iCustom on bar closes then use ticks for everything else?