TimeCurrent() could help but
Any ideas on how I can do that without using the time functions?
you're doomed I'm afraid.
Roger wrote >>
you can use function iVolume:
if(iVolume("USDCHF",PERIOD_M1,0)==1)//your trailing function
Hi Guys
Many thanks.
Irtron: You were right TimeCurrent() does work in the tester, so now at least I only have to evaluate the time every tick rather than the whole stop loss routine.
Roger: Another clever solution, haven't coded it yet but it may well be faster and use less CPU than the TimeCurrent() method.
Thanks Again
Keith

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
So it appears that Sleep(), does not work in backtesting. I need to find an alternate, the testing bogs down doing useless calcs.
Working on a 4 hr TF I don't need to evaluate my SL on every tick, once a minute is adequate.
Any ideas on how I can do that without using the time functions?
I can't use NewBar since it is a 4 hr chart, maybe there is some way to get newBar for 1 minute bars?
All suggestions deeply appreciated
Keith