Yes your are on the correct track here.
Make sure that you do a check for enough bars in the example below for your straegy to run:
http://www.ninjatrader.com/support/helpGuides/nt7/currentbars.htm
Also, make sure that you do your if(BarsInProgress == 0) checks to make sure that you only caclulate this for the OnBarUpdate() for the bars series you want this run on. Since with a multi series strategy OnBarUpdate() runs for all bar series added.
Let me know if I can be of further assistance.

Comment