How to Back-test?
How to Back-test?
14 Jul 2016, 10:03
Hello,
I am new to cTrader (since Monday) and love it. Can anyone tell me how to back-test my strategy? Not a Bot, just Price Action trader here.
Replies
yenyes.legacy68
23 Jul 2016, 19:13
RE:
bull375 said:
Hi Yenyes,
Unfortunately you cant backtest in ctrader as of yet. Ctrader does not have a strategy tester like in Metatrader 4. If you really want to backtest I would advise you to go for Metatrader 4 or Metatrader 5. There is information for Metatrader 5 on the net on how to program buttons for back testing.
Hey Bull,
Thanks for the reply. I just wish it did because I like the platform, simple, efficient and doesn't use up a lot of data and computer memory. Shame about the backtesting. Hope they sort it out
@yenyes.legacy68
zumzum
30 Jul 2016, 01:08
RE:
Hi Yenyes,
if you want to trade paper pencil style (just need a lot of chart history) you can try MT4 or Mt5 as bull said.
You wrote you are a PA trader so if you need tick data to backtest, Ninjatrader would probably be your choice (it has time and tick charts like ctrader) but you would need a data feed of course (there is at least one free tick data feed available, not telling the name here, since it might be regarded as unwanted broker discussion). Amibroker might be a choice as well.
If you want a complete testing environment I would go for forextester 2. Not free and development is pretty slow (v3 still not in sight) and also you can't you custom MT4 indicators but standard indis are available. Also you would need to feed it with tick data. Never the less it's pretty nice for pure price action testing because it tracks your trades (demo available).
Personally I go for the ninjatrader route for manual backtesting with paper pencil (feeding a database for statistical evaluation) because history bars in ctrader are limited.
Cheers
yenyes.legacy68 said:
Hello,
I am new to cTrader (since Monday) and love it. Can anyone tell me how to back-test my strategy? Not a Bot, just Price Action trader here.
@zumzum
yenyes.legacy68
31 Jul 2016, 05:11
Hi zumzum,
Thanks for the concise response. I agree Ninjatrader is the better option, have downloaded it and been back testing this weekend. Too bad cTrader doesn't have better capabilities, I really like the platform.
Thanks again.
@yenyes.legacy68
Jiri
31 Jul 2016, 13:20
RE:
tmc. said:
You can download cAlgo platform, make new cBot, leave its logic empty, make new instance and run backtest for desired period of time. That way you get chart for selected period of time and can do analysis there.
Additionally, once the chart is loaded you can attach your indicators to the chart, if you use any.
@Jiri
zumzum
31 Jul 2016, 14:53
RE: RE:
Thanks for the helpfull input :)
tmc. said:
tmc. said:
You can download cAlgo platform, make new cBot, leave its logic empty, make new instance and run backtest for desired period of time. That way you get chart for selected period of time and can do analysis there.
Additionally, once the chart is loaded you can attach your indicators to the chart, if you use any.
@zumzum
afhacker
17 Apr 2019, 13:38
( Updated at: 21 Dec 2023, 09:21 )
Now you can backtest your manual strategy on cTrader back tester.
Try our product: https://www.algodeveloper.com/product/manual-strategy-tester/
@afhacker
ap11
20 Apr 2019, 11:17
Hi,
Testing manual strategies on historical data is not supported out of the box. But you can use Visual Backtesting for this. cBot can use user inputs to open/close positions or place pending orders.
cBot can get user input from UI controls created in another window as in product Ahmad suggested. Or use some built-in cTrader events.
For now, cTrader support mouse events on the chart so you can create a cBot with trading commands using the mouse clicks. Below is an example of a cBot that uses
Shift + Left Mouse Button to open a buy position.
Ctrl + LMB to open a sell position.
Alt + LMB to close all positions.
[Parameter(DefaultValue = 0.1)] public double Lots { get; set; } [Parameter("StopLoss (pips)", DefaultValue = 20)] public double StopLossPips { get; set; } [Parameter("StopLoss (pips)", DefaultValue = 20)] public double TakeProfitPips { get; set; } protected override void OnStart() { var instructionsText = "Shift + LMB = Buy\nCtrl + LMB = Sell\nAlt + LMB = Close All"; Chart.DrawStaticText("instructions", instructionsText, VerticalAlignment.Top, HorizontalAlignment.Left, Chart.ColorSettings.ForegroundColor); Chart.MouseDown += OnChartMouseDown; } private void OnChartMouseDown(ChartMouseEventArgs obj) { if (obj.ShiftKey && !obj.CtrlKey && !obj.AltKey) ExecuteMarketOrder(TradeType.Buy, Symbol, Lots * Symbol.LotSize, "MouseTrading", StopLossPips, TakeProfitPips); else if (!obj.ShiftKey && obj.CtrlKey && !obj.AltKey) ExecuteMarketOrder(TradeType.Sell, Symbol, Lots * Symbol.LotSize, "MouseTrading", StopLossPips, TakeProfitPips); else if (!obj.ShiftKey && !obj.CtrlKey && obj.AltKey) Positions.ToList().ForEach(p => ClosePositionAsync(p)); }
You can see it in action on this video:
https://www.dropbox.com/s/asdijotjnr7tl02/MouseTrading.mp4?dl=0
@ap11
ap11
20 Apr 2019, 11:29
( Updated at: 21 Dec 2023, 09:21 )
In cTrader version 3.6 we will add a new feature called Chart Controls. Developers will be able to add UI elements on a chart like text labels, buttons, input fields, etc.
This version will be released to Spotware Public Beta in a couple of weeks.
Using these UI controls it will be possible to create trading panels that will work in Visual Backtesting:
You can see this example in action here:
https://www.dropbox.com/s/tg7oje9lc6bo5r9/ChartControls.mp4?dl=0
@ap11
albatros7
29 May 2019, 08:23
( Updated at: 21 Dec 2023, 09:21 )
RE:
Andrey Pisarev said:
In cTrader version 3.6 we will add a new feature called Chart Controls. Developers will be able to add UI elements on a chart like text labels, buttons, input fields, etc.
This version will be released to Spotware Public Beta in a couple of weeks.Using these UI controls it will be possible to create trading panels that will work in Visual Backtesting:
You can see this example in action here:
https://www.dropbox.com/s/tg7oje9lc6bo5r9/ChartControls.mp4?dl=0
hi, any news on the release of version 3.6?
I need to do maual backtesting
@albatros7
PanagiotisCharalampous
29 May 2019, 09:32
Hi Ariel,
Thanks for positng in our forum. We are currently rolling out v3.5 to brokers. 3.6 will come after that.
Best Regards,
Panagiotis
@PanagiotisCharalampous
albatros7
29 May 2019, 09:34
( Updated at: 21 Dec 2023, 09:21 )
RE:
Andrey Pisarev said:
Hi,
Testing manual strategies on historical data is not supported out of the box. But you can use Visual Backtesting for this. cBot can use user inputs to open/close positions or place pending orders.
cBot can get user input from UI controls created in another window as in product Ahmad suggested. Or use some built-in cTrader events.
For now, cTrader support mouse events on the chart so you can create a cBot with trading commands using the mouse clicks. Below is an example of a cBot that uses
Shift + Left Mouse Button to open a buy position.
Ctrl + LMB to open a sell position.
Alt + LMB to close all positions.[Parameter(DefaultValue = 0.1)] public double Lots { get; set; } [Parameter("StopLoss (pips)", DefaultValue = 20)] public double StopLossPips { get; set; } [Parameter("StopLoss (pips)", DefaultValue = 20)] public double TakeProfitPips { get; set; } protected override void OnStart() { var instructionsText = "Shift + LMB = Buy\nCtrl + LMB = Sell\nAlt + LMB = Close All"; Chart.DrawStaticText("instructions", instructionsText, VerticalAlignment.Top, HorizontalAlignment.Left, Chart.ColorSettings.ForegroundColor); Chart.MouseDown += OnChartMouseDown; } private void OnChartMouseDown(ChartMouseEventArgs obj) { if (obj.ShiftKey && !obj.CtrlKey && !obj.AltKey) ExecuteMarketOrder(TradeType.Buy, Symbol, Lots * Symbol.LotSize, "MouseTrading", StopLossPips, TakeProfitPips); else if (!obj.ShiftKey && obj.CtrlKey && !obj.AltKey) ExecuteMarketOrder(TradeType.Sell, Symbol, Lots * Symbol.LotSize, "MouseTrading", StopLossPips, TakeProfitPips); else if (!obj.ShiftKey && !obj.CtrlKey && obj.AltKey) Positions.ToList().ForEach(p => ClosePositionAsync(p)); }
You can see it in action on this video:
https://www.dropbox.com/s/asdijotjnr7tl02/MouseTrading.mp4?dl=0
Error to compile
@albatros7
md.hidayat2705
18 Apr 2021, 11:36
( Updated at: 21 Dec 2023, 09:22 )
RE:
AndreiPisarev said:
In cTrader version 3.6 we will add a new feature called Chart Controls. Developers will be able to add UI elements on a chart like text labels, buttons, input fields, etc.
This version will be released to Spotware Public Beta in a couple of weeks.Using these UI controls it will be possible to create trading panels that will work in Visual Backtesting:
You can see this example in action here:
https://www.dropbox.com/s/tg7oje9lc6bo5r9/ChartControls.mp4?dl=0
Hi Andrei,
Could you please post the code for the above sample? I want to learn how to make buttons like that too. There are few cBot/indicators that I found using button but their codes are too complex for me to comprehend and to learn from it. API Reference doesn't gave example on this too.
Thank you in advance and apologize for being a noob :)
@md.hidayat2705
glennlathom
19 Oct 2023, 12:33
( Updated at: 20 Oct 2023, 05:18 )
I agree Ninjatrader is the better option, have downloaded it and been back testing this weekend.
@glennlathom
bull375
17 Jul 2016, 16:58
Hi Yenyes,
Unfortunately you cant backtest in ctrader as of yet. Ctrader does not have a strategy tester like in Metatrader 4. If you really want to backtest I would advise you to go for Metatrader 4 or Metatrader 5. There is information for Metatrader 5 on the net on how to program buttons for back testing.
@bull375