Hi all.
Not sure if anyone can help me with this. I have not been able to find a similar topic on the forums.
I currently manually trade off the 9ma bollinger bands. I buy when (in addition to other conditions) price is within 5 pips from the lower band and sell when price is within 5 pips from the upper band (2 STD).
I have been battling to create an EA for this. If I remove the 5 pips condition, it seems to work fine, but I miss quite a few trades.
To cut the story short, I have attached the EA. I have used the MQL function so I can add something like lowerband+50 (since my broker uses 5 digits). However, this seems to open very random trades everywhere. When I change it to lowerband+5, it opens no trade.
So is there some way to include an integer (eg 5 pips) within the condition that uses the bands?
For now, I have only done the 'Buy' part. Once I am done with the Buy, the Sell will be easy.
|