Forum

Moving a line

Can anyone help with the following. I want to create a horizontal line at the bid price, then allow the line to be moved and stay at the new price. The following draws the line and allows moving, but when I changed time frames it moves the line back to bid. Is there a way to stop it being moving

Coding

//+------------------------------------------------------------------+ //| Indicators.mq5 | //| Copyright 2022, MetaQuotes Ltd. | //| https://www.mql5.com |