Hi,
Me again
I'm trying to better myself at coding MQL4 so I figured writing EAs would best help me practice so I coded an Inside Bar EA (no strategy just for learning) and I'm having problems with entries.
I reviewed my code several times but I'm still missing something, some entries are according to rules and some are way off and I can't figure out why.
Rule are:
Once IB has been found, note the IBHigh and IBLow, if the next bar opened between IBHigh and IBLow and closed above IBHigh, buy, the opposite for sell.
Retain IBLow and IBHigh in case there is a reversal, SL is either amount of money lost or close above the IBHigh for sells and opposite for buys.
Some orders are being opened for sells as if they were buys and vice versa but not all the time.
Maybe it's related to me not clearing the IBLow and IBHigh between IBs? But I want to save them in case of a reversal.
Any help would be greatly appreciated.
Thanks.
Me again
I'm trying to better myself at coding MQL4 so I figured writing EAs would best help me practice so I coded an Inside Bar EA (no strategy just for learning) and I'm having problems with entries.
I reviewed my code several times but I'm still missing something, some entries are according to rules and some are way off and I can't figure out why.
Rule are:
Once IB has been found, note the IBHigh and IBLow, if the next bar opened between IBHigh and IBLow and closed above IBHigh, buy, the opposite for sell.
Retain IBLow and IBHigh in case there is a reversal, SL is either amount of money lost or close above the IBHigh for sells and opposite for buys.
Some orders are being opened for sells as if they were buys and vice versa but not all the time.
Maybe it's related to me not clearing the IBLow and IBHigh between IBs? But I want to save them in case of a reversal.
Any help would be greatly appreciated.
Thanks.
Attached File(s)
IBer.mq4
16 KB
|
153 downloads