Hi Amine
Thank you for having a look at my strategy. I do apologise for my original poor description. I did not realise how confusing it was until I read it again. It is more difficult than I thought. Your questions have made me realise some of my logic was wrong and also made me consider other factors. I will try and do a better job this time but please ask again if I am still unclear.
I want to run this strategy on the 60 minutes EUR/USD.
It is discretionary when I run the strategy. I will use it for trade entry and management when I wish to place a pending buy stop . If I decide to trade, the strategy should place a pending buy stop at high of the last complete candle and an initial associated stop-loss at the low of last complete candle The lot size/risk will be percent of equity and based on pips difference between buy stop and stop-loss.
If during the current period, the buy stop is not touched (no orders) ,and the current price goes below the initial stop loss level (ie if the candle goes lower than the previous candle) then the stop-loss and lot size should recalculated so that the stoploss is always at the lowest possible level.
(This is done in real time..not waiting for current candle to finish)
If the buy stop is not touched (no orders) then the pending order should be closed just before a new candle is formed. The pending buy stop is then recalculated and placed on this newly formed candle. There is ever only one pending buy stop. It keeps looking to buy and with the lowest initial stop-level.
If during the current period the buy stop is touched (market order) then the initial stop-loss should not be moved. No other trades should be entered.
The one exception to the rules above is when we have an inside candle. It will have a lower high and a higher low than the previous candle. Its complete range will be inside the previous candles range. In this case the buy stop will still be moved to the high of inside candle but the associated stop-loss should be left at the previous candle. ( The previous candle has a lower low than the inside candle so a safer stop-loss level..it is probably a fractal?)
This would also be the case if we have multiple inside candles within each other. We would keep the stop-loss at the original candle that had the lowest low (the candle whose range the inside candles are within) If buy stop not entered (no orders) and price goes below stop-loss level then recalculate stop-loss level. If buy stop not entered (no orders) and next candle not an inside period treat as normal. (IE buy stop at high and initial stop-loss at low)
The strategy would keep working until a buy stop is touched ( market order). If we are in the market no further trades are placed. Once our position is flat due to initial stop-loss or raised stop-loss a new pending order can be placed..(note this would only be the case when historically testing...if used in live trade the strategy would stop until needed again)
In regards to orders they should be placed as two buy stop orders at the same price so that two different stop-loss strategies could be used.( Effectively split order in two so can use different SL for each). The first would be simple trailing stop under the subsequent finished candle lows. The second could be to move stop-loss to successive fractal lows ( a low with a candle either side that has a higher low).
I hope this seems more sensible than my first attempt and has answered your questions. Thanks again.
