Actions:
I created an indicator class called Statistics. Within that class, I wrote a method called Skew. The new indicator where I want to create objects from the Statistics class is called SkewDiff
Problem:
I don't understand how to call methods from other classes.
How do I create an object in the new indicator SkewDiff and assign its value to the Skew() method from the class Statistics? I know I could just copy and paste the method, but I'm trying to learn how to reference everything.
What I tried so far in SkewDiff (and it's probably way off the mark):
#region Variables
private DataSeries skewCtoO ;
#endregion
// skewCtoO represents skew of the Close to Open
protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "ClosetoOpen"));
Statistics skewCtoO = new Statistics();
}
protected override void OnBarUpdate()
{
closeOpen.Set(Close[0] - Open[0]);
ClosetoOpen.Set(skewCtoO.Skew(barLookBack , closeOpen));}
Comment