I need some help in my indicator design. can you please point me to some sample example.
I have built the custom indicator by using all the available properties of a bar (close,high,low,open,volume). It is working as expected when applied to a chart or used in the strategy.
Now I need to call the same indicator in different time frames in a strategy.
Example: running strategy on 500 tick chart
Indicator name : XYZ
Parameters: A, B, C
Return values: data series 1, data series2.
In the strategy have below code to call the indicator.
Variables section: Private XYZ myxyz;
Onstartup: myxyz=XYZ(1,2,3);
In onbarupdate: I am able to use the myxyz .dataseries 1, and myxyz .dataseries2 and the values are exactly matching with the values when I apply XYZ indicator to the 500 tick chart.
Now I have added new data series (2000 tick) to the strategy using Add(PeriodType.Tick, 2000); in Initialize method.
Need to get the values from XYX for 2000 tick data along with 500tick data.
How do I pass this new data series to XYZ? Do I need to make any changes to XYZ indicator?
i tried with below, looks like it is not working as i am using High,Low, Close, volume in XYZ
Variables section: Private XYZ myxyz2000;
Onstartup: myxyz2000=XYZ(Closes[1],1,2,3);
Thanks
gsreddy
Comment