Need understanding on how Bar selections work

Hi friends,

I observed below scenario in Amibroker.

  1. During bar replay I was trying to print Low and LastValue(Low) to check the value.
_TRACE("candleTime: "+TimeNum()+ "   low: "+Low+ " LastValue Low : "+LastValue(Low));

candleTime: 94700 low: 1390.5 LastValue Low : 1365.2
candleTime: 94700 low: 1390.5 LastValue Low : 1365.2
candleTime: 94700 low: 1390.5 LastValue Low : 1365.2
candleTime: 91600 low: 1412.75 LastValue Low : 1365.2
candleTime: 91600 low: 1412.75 LastValue Low : 1365.2
candleTime: 91600 low: 1412.75 LastValue Low : 1365.2

when the bar selected the Low value is fixed and candle is also fixed ..
the first 3 rows printed when bar not selected and rest 3 row is when bar is selected.

LastValue(Low ) working as expected.
Most of logic I have written on Cross over of low or high value.

BuyTrailingSL_cross =Cross(Ref(BuyTrailingSL, -1), Low);

so what happen here if I click on chart during running AFL in live market ..
Wrong low or high value captured due to above said reason and signal generated.

Yes, I can use LastValue(Low) to get it working correctly but during off market, Signal is not printed on chart since its already considering LastValue(Low ), which is last value of last candle.

Please suggest How can deal with this scenario .

In My View If I get a way, not select the data bar while clicking on chart but sometimes I need to check value and click on chart and value get selected.

How to turn off data selection feature so that If I click on chart no data selected by mistake.

Thanks

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.