
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
Oh wait a min.
The return keeps it from getting to the if(trading statements)
I think I see now, it keeps returning while Trade0Last == Time[0] keeping it from getting to the if(trading statements)
It's becoming more clear now
And so it won't continue until the next BAR because Time0Last == Time[0] and as soon as the next bar opens then Time0Last == Time[0] will be false and will not return AHHHH Brilliant !
Then once it trades, it will do the loop and reset to Time0Last = Time[0] and all is well and will not trade again
TOTALLY COOL !!
Someday I too will be a guru on MQL4 :)
Thanks this is working perfectly now and I do understand this now after about 4 hours of going over and over it, and writing a bunch of arrows on paper LOL
This thing reminds me of a Mechanical Pressure activated valve I made that does the same thing except mechanical. Funny how mechanical switches and valves with regard to pressure and volume can relate to any of this. But it really does believe it or not. Open valve if(pressure = X) and divert to other location if(pressure = Y) same sort or principals
Anyhow,
I'm so excited about this I can't stop babbling on. ANOTHER WORKING EA YEA !
Now I got to sort out this problem that just started with ALL my EA's which is the SL and TP are now off by 10 ever since I downloaded data to the history center on 1m charts
I think the metaquotes download is 4 digit broker or something so I'm not sure whats going on there but the download broke my EA's
You are using MT5, not MT4 (this forum).
There are no predefined arrays in MT5 unless you define them.
Using global arrays like Open[], Close[], Low[], High[] in custom indicator for MetaTrader 5 - MQL5 programming forum (2023)