Forum

Is aligning OBJPROP_TEXT to the right for trendline object possible?

"test" description (circle in yellow) in the trendline object, would like to change the text description alignment to right side by coding. is this possible for OBJPROP_TEXT? I rather don't want to add extra label or text object

How to Deinit the indicator from OnCalculate?

I don't think it is possible but wonder if there is a way to Deinit the indicator from OnCalculate? Tried "return(-1)" but it just get pass to " prev_calculated" so it will not exit the indicator program. Tried calling OnDeinit() function but once it jump to OnDeinit it will return back where it was

work around idea of using BarsCalculated and CopyBuffer function in different timeframe

I did search MQL5 forum but seems like iCustom is executed at incorrect sequence in OnCalculate when using it in different timeframe as the chart's base timeframe. below table in the left is when using same timeframe M5 for the chart and iCustom. right table is when using M1 timeframe in chart and