I've coded a strategy using 4 previous candles ( shift4,shift3,shift2,shift1)
If shift4, shift3 are green and shift2, shift1 are red it should sell on the close of shift1 or open of the new current candle.
If shift4, shift3 are red and shift2, shift 1 are green it should buy on the close of shift1 or open of the new candle.
To filter I've used: Green = open < close ; Red = open > close
Issue 1:
However it opens trades randomly, on the chart attached it can be seen it opens trades after 1 red, 2 green and 1 red despide the way I coded it.
Issue 2:
It opens trades at other times and at other prices. It should open on the close of candle shift 1 not at other times/prices.
Issue 3:
I think this is caused by my lack of coding skills with Visual Jforex: I'm trying to set a trailling stop as soon as the transaction is in profit in 25 pips, but I've not managed.
Issue 4:
Is there a way to close all open transactions Friday at 20.00 GMT no matter of profit,losses?
Thank you for your input.