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
Ok so I fixed it up so the prevdayrange is the only array. Now for some reason the USDJPY section of the code isn't working. It is the same as the other 4 statements with the pair changed in iopen's and the correct array value...
Here is what it does ---> http://clip2net.com/s/13WDY
How do you put spaces in the comment function and can you get it to print to the next line?
Ok so I fixed it up so the prevdayrange is the only array. Now for some reason the USDJPY section of the code isn't working. It is the same as the other 4 statements with the pair changed in iopen's and the correct array value...
Here is what it does ---> http://clip2net.com/s/13WDY
How do you put spaces in the comment function and can you get it to print to the next line?
The first element in an array is 0, if an array has 4 elements the last will be 3 not 4 ;-) https://docs.mql4.com/basis/variables
Comment()
Alright this code is pretty much doing what it is meant to except when a new 6:00 candle opens It doesn't update the information. If the current candle is a 6:00 candle I want it to scan that bars open and go back 24 bars and scan that bars open and do all the calcs and if the current bar is not a 6:00 bar then keep stepping back a bar until it finds the last 6:00 candle. It seems to be stepping back ok but doesn't seem to like if the current candle is the 6:00. Can't work it out. Can the legends spot the problem?
The code is getting too extensive to post on here so I had to upload the source code
It seems to be stepping back ok but doesn't seem to like if the current candle is the 6:00. Can't work it out. Can the legends spot the problem?
Is this using the Strategy Tester ? if it was . . .
Nope Raptor this was on a live chart., Should I change
Just thinking out aloud there not sure if that would fix anythingNope Raptor this was on a live chart., Should I change
Just thinking out aloud there not sure if that would fix anythingEverything seems to work fine but it won't pick up the 6:00 bar unless it is behind the current bar if that makes sense.
Thanks for your time Raptor
Everything seems to work fine but it won't pick up the 6:00 bar unless it is behind the current bar if that makes sense.
Thanks for your time Raptor
Yes I think I understand what you are saying, it doesn't update when the time changes from 05:59 to 06:00 . . .
I'm using MBT for testing and it's Server time for the current H1 bar is 04:00 so I have set iOpenHour to 5, lets see what happens in 20 mins.
OK, I have the same issue, no update when the current candle opened at 05:00 . . . . interesting.