Hi The attached code works fine except for the “stop” which closes losing trades at the end of the day using the Flatafter condition. My intention is to place the stop 1.1 points above the high of the 8:00 am (GMT) candle. Can anyone suggest how this could be gone please? The “SellPrice” sets itself per the low of the 8:00 am candle -1.1 points correctly. I can graph c1 which is showing the correct value but cannot seem to work out how to link the value to the “stop”. Can anyone help please? DEFPARAM FlatAfter = 163000 StartingTime = 080500 SellPrice = Low[0] - 1.1*pointsize //sell contract if time >= 080500 and time < 081000 then sellshort 1 contract at SellPrice stop endif //stop loss if time = StartingTime then c1 = (High[0]+1.1*pointsize) endif SET STOP LOSS c1 //set limit if time = StartingTime then c2 = (High[0]-Low[0])*1.5 endif SET TARGET PPROFIT c2