The long strategy I am currently working on has 3 different entry conditions and 3 Different exit conditions. The Entries are labeled LEa, LEb, LEc.
Things seem to be fine on the entry front, but I have a couple of quirks on the exit side I am trying to locate. One possibility might be in the way I coded the exit orders. They are as follows:
if (Exit Condition 1 occurs ... Not the actual code)
{
ExitLongLimit(longExit1,"LX1", "LEa");
ExitLongLimit(longExit1,"LX1", "LEb");
ExitLongLimit(longExit1,"LX1", "LEc");
}
if (Exit Condition 2 occurs ... Not the actual code)
{
ExitLongLimit(longExit2,"LX2", "LEa");
ExitLongLimit(longExit2,"LX2", "LEb");
ExitLongLimit(longExit2,"LX2", "LEc");
}
if (Exit Condition 3 occurs ... Not the actual code)
{
ExitLongLimit(longExit3,"LX3", "LEa");
ExitLongLimit(longExit3,"LX3", "LEb");
ExitLongLimit(longExit3,"LX3", "LEc");
}
Here is my question: Does NinjaScript process all 3 exit conditions for all 3 Entry conditions? Let's say I am Long with 3 different positions LEa, LEb, and LEc. If Exit condition 2 occurs is there any reason all 3 long positions would not trigger an Exit long order at longExit2?
When I test this in the sim account I seem to be getting sporadic exits and I am trying to narrow whether it is due to an error in my conditions or in the fashion I have grouped the multiple exit orders.
Thanks for the help!!!
Learning1
Comment