This is the issue that I facing.
Account Type: SIM
Trading: Forex
NinjaTrader: 7.0.1000.30, 64-bit
Issue:
I have notice that Orders are simply not being send\Executed during testing of my automated strategy. This is not observed during the historical testing, only when the Strategy is running in live mode
To make sure that I am not gone Mad, I decided to verify that.
This is the code that I using
string tempPostionDirection;
int tempSize;
if (Position.MarketPosition == MarketPosition.Long)
{
tempPostionDirection = "Long";
}
else
{
tempPostionDirection = "Short";
}
int Position_Multiplier = 1;
if (Position.MarketPosition == MarketPosition.Short)
Position_Multiplier = -1;
if (globalPositionSize > 0 && (Position.Quantity != Math.Abs(globalPositionSize) || Position.MarketPosition != MarketPosition.Long) )
{
tempSize = Convert.ToInt32(globalPositionSize - Position.Quantity*Position_Multiplier);
WriteToLog(path_folder+path_temp_file,"SIZE CORRECTION. globalPositionSize: " + globalPositionSize + ". Position.Quantity: " + Position.Quantity + ".Position.MarketPosition: " + Position.MarketPosition + ".TempSize: " + tempSize);
if (tempSize > 0)
EnterLong(tempSize);
else
ExitLong(-tempSize);
return;
}
WriteToLog - is a simple function that I wrote that outputs some messages.
Sure enough -> I got constantly messages from the WriteToLog function:
20160211 72516,SIZE CORRECTION. globalPositionSize: 10. Position.Quantity: 30.Position.MarketPosition: Long. TempSize: -20
But EnterLong/ExitLong Order did not work.
Can you let me know if there any additional debugging do I need to turn on to figure out why it is not sending any Orders?

Comment