I would really appreciate someone's help with this problem on a strategy I am testing?
I'm new to csharp and really impressed with the strategy builder and everything Ninja and getting familiar with using the Builder.
Does anyone have any idea why the entry order seems to always be on the bar after the bar I would expect the order to execute on,
It's s a little hard to see but notice after the "Exit Order On Session Close: you will see the LE 1 @ 4075.00 for long entry on what looks to the bar following where my long condition was satisfied and this code executed:
Here is the code it's happening on both long and short entries, the exits are perfect as is the Exit On session Close.
I am also checking for a market position long or short to paint the background
If short condition exists. I'm really hoping I can get this to execute on the prior as it's only 1 bar but seems to effect the strategies profitability.
{
EnterShort(Convert.ToInt32(DefaultQuantity), @"SE");
BackBrush = Brushes.MistyRose;
}
if ((Position.MarketPosition == MarketPosition.Short)
&& (Close[0] > Open[0]))
{
ExitShort(Convert.ToInt32(DefaultQuantity), @"SX", "");
}
if (Position.MarketPosition == MarketPosition.Long)
{
BackBrush = Brushes.Honeydew;
}
if (Position.MarketPosition == MarketPosition.Short)
{
BackBrush = Brushes.MistyRose;
}
}
Comment