I am attaching a portion of the code for review:
// Condition set 10 - get out of a Long position if still in at End Time.
if ((ToTime(Time[0]) > TimeEnd)
&& Position.MarketPosition == MarketPosition.Long
&& Position.Quantity > 0)
{
Print ("9: End of Session, Close Long Position");
ExitLong("End of Session");
//Disable();
}
I have tested with and without a name in the ExitLong().
Thanks for your help.
Comment