Determine DataSeries Input - (O, H, L, C)
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
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