Determine DataSeries Input - (O, H, L, C)

Created at 19 Jan 2021, 00:03
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!
BO

Bots4Us

Joined 28.12.2020

Determine DataSeries Input - (O, H, L, C)
19 Jan 2021, 00:03


Hi cTraders,
It is easy to offer different dataseries (O,H,L,C) as input for indicators, etc.
Example:
[Parameter("Source SMA #1")]
public DataSeries SourceSMA1 { get; set; }
However, I struggle on the following. Couldn't find this in the documentation.
Q1: Is there a way to determine from within a backtest/optimization which type (e.g. Close) was chosen for each enum offered?
When I try to log this, I get something like "DataSeries (Count: 123, LastValue: 1,13061)", but not the type (e.g. Close).
Q2: Is it possible to automatically iterate through the type (O, H, L, C) during an optimization?
Thx, Bots4Us

 


@Bots4Us
Replies

PanagiotisCharalampous
19 Jan 2021, 09:03

Hi Bots4Us,

Q1; No this is not possible. 

Q2: Not possible either

You can try using your own custom enum that will enable you  control both of the above.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous