Turn an Ea from working on every tick to work on open prices only, or every 15 seconds or any such interval.
use OnTimer() for it
Pak Hong Poon #:
use OnTimer() for it
use OnTimer() for it
Thanks a Lot.
I browsed through the forum and was stuck in using datetime variable along with itime function and a fixed time gap variable. But since tick delay in not constant, so the diy timer was inaccurate. Worked almost fine for timegap greater than 2-3 mins.
But this OnTimer() is perfect . solved the issue in minutes.
saurabhsuman003 #:
Thanks a Lot.
I browsed through the forum and was stuck in using datetime variable along with itime function and a fixed time gap variable. But since tick delay in not constant, so the diy timer was inaccurate. Worked almost fine for timegap greater than 2-3 mins.
But this OnTimer() is perfect . solved the issue in minutes.
you are welcome:)
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 have been exposed to writing the trading logic onside the ontick() function and see them trade on the logic programmed.
This is a simple code( I know this is non-working but take it for a practical code that we will work on). I want it to trade or check trading conditions every 15 seconds. So what changes do I need to make ???
Thanks.