I use H4 OPEN price in my EA. I don't want to check every tick and only to check every beginning of 4 hours. How to do that?
- Change Strategy Tester Speed (between 31 and 32)?
- Every Hours Enter post
- How to check TimeMinute(Time[0]) = 30 at TF-H4 ?
if(Volume[0] == 1)
{
... do your stuff...
}
.
When that is true, you are at the first tick of a new bar, in the chart timeframe.
int prevtime = 0; int start() { if(prevtime == Time[0]) return(0); prevtime = Time[0]; // your code here }Try above code
Try above code
Thanks riyo! I've tried and it worked.
Then say "I don't like this method at all", and use a Time method, or use both.
Thanks phy! I searched the documentation and knew what Volume[0] meant. However, I have a question, waht if the volume of first tick doesn't equal to 1?
The value of Volume[0] is not a real volume but always a count for ticks in this period. So if Volume[0] == 5 itmenas the 5th tic in actual period. So what do you
mean with " .. the volume of first tick doesn't equal to 1? .."
The value of Volume[0] is not a real volume but always a count for ticks in this period. So if Volume[0] == 5 itmenas the 5th tic in actual period. So what do you
mean with " .. the volume of first tick doesn't equal to 1? .."
I have thought the Volume is the actual volume, so I have a question of that. Know I understand, thanks.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use