At the start of my strategy I have a certain condition:
int moreContracts = 3;
if(A == 1)
{
EnterLong(1);
}
and it works just fine at real time... along the code, if that condition change and A == 3 (for instance), I would like to add more contracts using the variable moreContracts declared above:
if(A == 3)
{
EnterLong(moreContracts);
}
The problem is that when it tries to buy more contracts, I get an error on the order fill.
I get the message attached to this post.
I already renamed the DB file to OLDNinjatrader.sdf, so the system would generate a new one, but I still get the same error.
All I want to do is buy more contracts when a certain condition change, how do I do that?
Thanks a lot.
Comment