Array question about High[],Low[],Close[],Open[] etc. - page 2

 
Agent86:
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)


Well done, you are learning . . . if you head isn't hurting you aren't thinking hard enough ;-)
 
WOW,

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

Reason: