MI
Topics
29 Jan 2018, 10:34
2121
6
Replies
mishavas15@gmail.com
29 Jan 2018, 17:21
( Updated at: 21 Dec 2023, 09:20 )
Yes. I'm using this function. But the lines are not displayed on the graph. Here is the code for the example:
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class TestBot : Robot
{
protected override void OnBar()
{
DateTime time = GetCurrentTime();
string id = "line " + time;
ChartObjects.DrawVerticalLine(id, time, Colors.Red);
Print(id);
}
private DateTime GetCurrentTime()
{
return MarketSeries.OpenTime.LastValue;
}
}
Result:

@mishavas15@gmail.com
mishavas15@gmail.com
29 Jan 2018, 17:36
Yes. For the actual chart works. Is there is a way of displayend lines in the backtest using bot?
@mishavas15@gmail.com