I'm trying to use an Option strategy example as a basic template, but I'm trying to reference Dividends -- and I have literally copied & pasted from the Dividends example -- and it's saying my dividends are refd before assignment.  They arent.  Can someone just show me how to reference dividend in ANY way, that would be great.

 

I can work in C# or Python, just any documentation beyond a picture of the Dividend class would be appreciated.

 

I also don't have a backtest to post -- if I did I wouldn't be on the damn forum.