Here's the code and the output:
Print("==========");
Print(Times[0][0]);
Print("Position.MarketPosition: " + Position.MarketPosition);
Print("Closes[0][0]: " + Closes[0][0]);
Print("Opens[0][0]): " + Opens[0][0]);
Print(Closes[0][0]>Opens[0][0]);
//if we're long and the close of the primary data series is greater than the open of the primary data series do something
if (Position.MarketPosition == MarketPosition.Long && (Closes[0][0]>Opens[0][0]));
{
Print("we actually are getting in here");
}
2/3/2022 9:14:56 AM
Position.MarketPosition: Flat
Closes[0][0]: 4521
Opens[0][0]): 4522
False
we actually are getting in here
There are no other prints in the code and the way I see this is that it knows that the close is less than the open and it knows that we're flat yet it's still getting into the if statement.
The secondary data series is a tick data series.
I am absolutely perplexed.

Comment