How to clear the Backtesting tab after the backtest ran?

Created at 26 Aug 2024, 11:07
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!
KA

karatedog

Joined 09.07.2024

How to clear the Backtesting tab after the backtest ran?
26 Aug 2024, 11:07


I have a strategy that I have backtested.

The strategy is obviously badly coded, so it messes up the backtesting window, opening metric tons of trades and I cannot see anything. (I have also added markers where trades would have opened and I want to check the conditionals why they haven't happened as I was expecting them).

Is there a way to clear the backtest results instead of removing the cBot and the readding cBot? To debug my badly coded cBot I add a few drawing elements to the backtest tab which disappears if I remove the cBot and then readd it.


@karatedog
Replies

BlackTiger83
26 Aug 2024, 11:45

Why would you want that? Simply start a new test with new parameters :)


@BlackTiger83

karatedog
26 Aug 2024, 12:36 ( Updated at: 26 Aug 2024, 12:49 )

RE: How to clear the Bactesting tab after the backtest ran?

BlackTiger83 said: 

Why would you want that? Simply start a new test with new parameters :)

And hope for the script to be better? :D

Clearly, I have no idea why my script is wrong (otherwise I would not have programmed that problem into the script). So I have to “debug”. There is no debug feature in cTrader so I had to make it myself which is bastardizing the output screen with drawn characters where certain events should have happened (like to MAs crossing each other and THERE I expect the BUY to happen). I have to do this because cBots lack almost all plotting features that an Indicator has (for some weird reason). 

But those self-created debug prints will be completely overwhelmed by the result of the backtest and there was no obvious “clear” option.

When you add a symbol to a cBot, the starting screen is empty. Why isn't there an action that brings the user back to that empty state?

Also, this kind of displaying the trades (drawing gazillion horizontal lines) is pretty much useless, compared to what others do to make less noise:


@karatedog

PanagiotisCharalampous
27 Aug 2024, 06:23

RE: RE: How to clear the Bactesting tab after the backtest ran?

karatedog said: 

BlackTiger83 said: 

Why would you want that? Simply start a new test with new parameters :)

And hope for the script to be better? :D

Clearly, I have no idea why my script is wrong (otherwise I would not have programmed that problem into the script). So I have to “debug”. There is no debug feature in cTrader so I had to make it myself which is bastardizing the output screen with drawn characters where certain events should have happened (like to MAs crossing each other and THERE I expect the BUY to happen). I have to do this because cBots lack almost all plotting features that an Indicator has (for some weird reason). 

But those self-created debug prints will be completely overwhelmed by the result of the backtest and there was no obvious “clear” option.

When you add a symbol to a cBot, the starting screen is empty. Why isn't there an action that brings the user back to that empty state?

Also, this kind of displaying the trades (drawing gazillion horizontal lines) is pretty much useless, compared to what others do to make less noise:

Hi there,

It seems you are not very familiar with cTrader

There is no debug feature in cTrader

Of course there is, cTrader has the most advanced debugging options compared to other tools I know

 

I have to do this because cBots lack almost all plotting features that an Indicator has (for some weird reason).

No it doesn't. Check how you can plot indicators using a cBot https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/?h=addindicat#addindicators

Also, this kind of displaying the trades (drawing gazillion horizontal lines) is pretty much useless, compared to what others do to make less noise:

The horizontal likes are not trades. They are positions and orders. You can enable/disable the in your chart's viewing options. Deals are represented with the deal map.

Take some time to learn cTrader better and your life will become easier :)


@PanagiotisCharalampous

karatedog
28 Aug 2024, 09:41 ( Updated at: 28 Aug 2024, 10:06 )

RE: RE: RE: How to clear the Bactesting tab after the backtest ran?

PanagiotisCharalampous said: 

karatedog said: 

BlackTiger83 said: 

Why would you want that? Simply start a new test with new parameters :)

 

Take some time to learn cTrader better and your life will become easier :)

Thanks a lot for the above information. I would learn cTrader better but unfortunately these forum posts are the best information source besides Google. I was not successful searching the Help. though it is true, I did not want a full-fledged debugging feature, having simple markers on the chart is enough.


@karatedog

karatedog
28 Aug 2024, 10:03 ( Updated at: 28 Aug 2024, 10:06 )

RE: RE: RE: How to clear the Bactesting tab after the backtest ran?

PanagiotisCharalampous said: 

No it doesn't. Check how you can plot indicators using a cBot https://help.ctrader.com/ctrader-algo/references/Attributes/RobotAttribute/?h=addindicat#addindicators

Also, this kind of displaying the trades (drawing gazillion horizontal lines) is pretty much useless, compared to what others do to make less noise:

The horizontal likes are not trades. They are positions and orders. You can enable/disable the in your chart's viewing options. Deals are represented with the deal map.

Take some time to learn cTrader better and your life will become easier :)

I think the root cause is that you think I know what you know :D and obviously I don't. I cannot sometimes even formulate a question because I have no idea what the underlying terminology should be.

I have checked the link you sent me, and it made me realize, I can create an indicator within a cBot (immediate question, by creating an Indicator class? same way as I create an Indicator, creating a subclass of Indicator class? I could not find further info on this). However this information is an “island”, I have been reading through help pages and Google for quite a time on cTrader, and no information ever lead me to this direction.

Also, poses the question, if I add something that is Indicator-like, why it is not automatically added without me telling “I want to add”? I have first created an Indicator, then I copied the code to cBot, and my Outputs were never drawn. So I concluded (just the same way Metatrader works) I cannot add line plotting to a cBot. (I now understand the technically an Indicator and a Robot has to be coded into a different class but this technicality could have been hidden from the developer).

And if I can add every Indicator element to a cBot, and it only takes a flip of a switch to show them, why separate Indicators and cBots? This separation is strangely in even Tradingview as well (study vs. strategy), where you don't need to modify any code between the two types just add the order management and suddenly an indicator turns into robot, but ie. their plotchar() works in both study and strategy, I don't need to refactor, move or any way modify code. They might be different behind the scenes, but it is hidden from me because it does not add any value knowing that difference.

Thanks for all the info, it was very useful!


@karatedog

karatedog
28 Aug 2024, 10:23 ( Updated at: 28 Aug 2024, 11:42 )

RE: RE: RE: RE: How to clear the Bactesting tab after the backtest ran?

This was really helpful: 


@karatedog