Add Spread Information to bars from server data rates

Created at 14 Jul 2024, 13:43
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!
QU

Quantrosoft

Joined 02.02.2024

Add Spread Information to bars from server data rates
14 Jul 2024, 13:43


When using “bars from server” as the data rate in opposite of “Tick data from server” there are just 2 options of how to generate the spreads:
1. Enter a fixed value
2. generate the spread randomly

Using “bars from server” as the data rate is obviously much faster as “Tick data from server” and as such is the preferred method especially when it comes to optimization with thousands of back test runs.
However, the spread information should be accurate also when using “bars from server” data rate. Both existing methods to specify the spreads with bars data rates do not make much sense when accurate spreads are needed and these 2 methods do not belong to a modern back testing/optimization platform as cTrader wants to be.

The solution to solve this issue is very easy: Just add the spread information to each bar stored in the history .zbars files and add a 3rd option to specify the spread source:


For more details see also:
https://ctrader.com/forum/suggestions/44294
 


cTrader Automate
@Quantrosoft