Starting to get more into the language (I'm from a C++/Java background). I wanted to know if there is a way I can use includes to move all of my standard utility functions into one easy to update class file rather than trying to remember to copy/paste it between each strategy whenever I find a bug or need to do an update.
Pretty much what I want to do is:
//Strategy_Utils namespace NinjaTrader.Strategy { public class Strategy_Utils : Strategy { public double util_function() { <Standard calculations here> } protected override void OnBarUpdate() { <Do I need to call this?> } } }
//MyStrategy namespace NinjaTrader.Strategy { public class MyStrategy : Strategy { protected override void OnBarUpdate() { Strategy_Utils.onBarUpdate(); double test=Strategy_Utils.util_function(); EnterLongLimit(DefaultQUantity,test,"test-signal"); } } }
Comment