Prevent Chart drawings from beeing delted after finishing backtest in visual mode

Created at 09 Jan 2021, 15:18
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
UW

uwescheffold

Joined 22.11.2020

Prevent Chart drawings from beeing delted after finishing backtest in visual mode
09 Jan 2021, 15:18


Hi all, is there anay posibility to see and analyse the chart drawungs after visual mode backtesting? In normal mode, the draw objects are delted after the backtest. 


@uwescheffold
Replies

prosteel1
09 Jan 2021, 15:55

Yes you need to set the IsInteractive = true

if (DrawHorizLines == true)
{
    var rect5 = Chart.DrawHorizontalLine(a + "-" + ShortCounts[a] + "ShortTRF", ShortTRFPrice[a], Color.Red);
    rect5.IsInteractive = true;
}


@prosteel1

uwescheffold
10 Jan 2021, 11:23 ( Updated at: 10 Jan 2021, 11:36 )

Set IsInteractive

Hi,  does the example work for you? With me it does not work, nothing changed, the chart is still empty after backup was done.

Maybe it's because var rect5 ist local scoped?


@uwescheffold