ChartObject in backtesting
ChartObject in backtesting
06 Apr 2015, 23:32
Can the ChartObjects.DrawText be used while backtesting.
I have various trade criteria and it would be nice if I could place a number over the candle to indicate the trade criteria used to enter the trade. Is this supposed to work or is it being planned or is it not on the radar??
Replies
WhiteSage
19 Apr 2015, 22:57
RE:
Spotware said:
We plant add chart objects to backtesting in the future. Currently all chart objects are ignored in backtesting.
It seems everything to do with drawing is disabled during backtest, when drawing becomes a feature it would be handy to have a toggle for it, so the user can turn them back off for speed.
@WhiteSage
Spotware
19 Jun 2015, 14:56
Dear Trader,
Thank you for your suggestion. We will consider it. Additionally you can post your ideas/suggestions to http://vote.spotware.com/
@Spotware
PanagiotisCharalampous
24 Oct 2018, 10:09
Hi lec0456,
Yes you can and you can use in conjunction with visual backtesting as well.
Best Regards,
Panagiotis
@PanagiotisCharalampous
lec0456
26 Oct 2018, 05:31
RE:
lec0456 said:
I tried sing this line of code in my cBot at the point it takes an action:
ChartObjects.DrawVerticalLine("vLine"+OnBarIndex, (int)OnBarIndex, Colors.Red, 1, LineStyle.Solid);
It does not place a line on the backtest chart.
How do I do it?
i tried using(spelling)
@lec0456
PanagiotisCharalampous
26 Oct 2018, 09:22
( Updated at: 21 Dec 2023, 09:20 )
Hi lec0456,
Here is an example
using System; using System.Collections.Generic; using System.Linq; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Internals; using cAlgo.Indicators; namespace cAlgo.Robots { [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)] public class NewcBot : Robot { [Parameter(DefaultValue = 0.0)] public double Parameter { get; set; } protected override void OnStart() { ChartObjects.DrawHorizontalLine("Test", Symbol.Bid, Colors.Red); } protected override void OnTick() { } protected override void OnStop() { // Put your deinitialization logic here } } }
and here is what you should see on the chart
Make sure you are using Visual Mode.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
26 Oct 2018, 09:43
( Updated at: 21 Dec 2023, 09:20 )
Here it is
@PanagiotisCharalampous
lec0456
26 Oct 2018, 10:14
It would be nice if you could select the directory for the Backtest Data so that you could use the the Beta release to backtest data from different brokers. I could probalbly manually copy in the data into the tick directory but it would be too cumbersome. but thanks for letting me know this is soon to be available. its a very important and nice feature.
@lec0456
Spotware
09 Apr 2015, 09:28
We plant add chart objects to backtesting in the future. Currently all chart objects are ignored in backtesting.
@Spotware