Strategy work from 4 am to 4 pm. Every open positions is closed after
4 pm.
Strategy use H4 timeframe. On begining every H4 candles the robot is
setting (buy/sell) activation level as arithmetic average low and high
prices previous candle. Also robot set buy-level as high price
previous candle plus shift (5 pips) and sell-level as low price
previous candle minus shift.
2 SMA (slow = 23 and fast = 10) appoint the trend. If fast SMA is
above slow SMA thend is to up and vice versa.
If current price cross the activate level from down to up then robot
get the consent for sell order. If current price cross the activate
level from up to down then robot get the consent for buy order.
Buy position is opened when the price is above buy-level, trend is to
up and robot has the consent for buy.
Sell position is opened when the price is below sell-level, trend is
to down and robot has the consent for sell.
I use USDJPY pair, stoploss = 20 pips and takeprofit = 50 pips.
On begining every next candle (if there is opened position) robot
check the current profit in pips. If the profit is higher than
min_profit = 15 pips then position is closed