Replies

analogpermutations
28 Dec 2020, 00:24 ( Updated at: 28 Dec 2020, 00:25 )

I cant believe nobody knows how to do this??  

Like why does it seem like it should be so simple, yet isn't.

Ive now tried this as well.

 

private MarketSeries daily;

protected override void OnStart(){
  daily = MarketData.GetSeries(Symbol, TimeFrame.Daily);
}

protected override void OnTick(){
   Print(daily.High.LastValue);
}


Still get this error

17/08/2020 00:00:00.162 | Backtesting started
17/08/2020 00:00:00.162 | Crashed in OnStart with NullReferenceException: Object reference not set to an instance of an object.
17/08/2020 00:00:00.162 | Backtesting was stopped

WHY!!??


@analogpermutations

analogpermutations
27 Dec 2020, 22:32

RE:

Figured it out.

Apparently 

public DataSeries Source;

has to be 

 

[Parameter("Source")]
public DataSeries Source { get; set; }

I feel like an idiot haha


@analogpermutations