GetTicks() gives only 200 ticks in backtesting mode — how to get more?

Created at 10 Mar 2024, 15: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!
CH

ChrisSpire

Joined 12.12.2022

GetTicks() gives only 200 ticks in backtesting mode — how to get more?
10 Mar 2024, 15:07


I am implementing a method to calculate Maximum Favorable Excursion (MFE). To achieve that I need all ticks from time of opening position to closing position, so I can see where the price moved in between. As seen below, when calling

var ticks = marketData.GetTicks(ht.SymbolName)

I get only 200 last ticks so it will not cover my desired time period even when position was opened and closed on the same day. 

How to get more ticks? Or maybe it is because this is backtesting running mode?

I have searched the documentation and forum. This topis was discussed but I didn't found exact answer.


@ChrisSpire
Replies

PanagiotisCharalampous
11 Mar 2024, 08:46

Hi there,

At the moment it is not possible. Such an option will be added in a future update. In the meanwhile, the workaround is to let the backtesting run without doing anything, until enough ticks are loaded.

Best regards,

Panagiotis


@PanagiotisCharalampous