I'm new to Ninja Trader but have experience trading. I created a Strategy in the New Strategy Builder and would like to please learn what to input in the "Conditions and Actions" window to create a simple Buy and Hold strategy to compare against other Strategies that (of course) are NOT buy and hold.
I'm sure this topic has been beaten to death but appreciate the help.
I understand I'm suppose to use something called OnBarUpdate() and ExitOnClose = true but not sure how to arrive at this using the New Strategy Builder. I've built strategies before using the New Strategy Builder but was wondering if I can create a new strategy called Buy and Hold.
I'm learning C# programming language and have not coded directly using Ninja Script but will be there shortly. I'd rather understand what I'm doing as oppose to just receiving the programming code and running it.
Please walk me through this as replies such as the one below are most likely correct but vague and intimidating to me right now as I am still new to programming. For example, where would I place this code? In the Ninja Script section or in the New Strategy Builder English version?
-start-
protected override void OnBarUpdate()
{
if (CurrentBar == 1)
{
EnterLong(DefaultQuantity, "BuyAndHold");
}
}
-end
I've been using other Backtesting Software in the past and NinjaTrader has the most comprehensive Strategy Builder that uses plain English and their support is second to none. I understand I can view the ninja code underneath the English version of "Conditions and Actions".
Appreciate the patience in reading my post
Stay well
Comment