For simplicity, assuming the strategy is Close[0] > mythreshold,
I did:
protected override void Initialize()
{
Add(PeriodType.Minute, 5);
}
OnBarUpdate()
{calculations to estimate my threshold}
if(BarsInProgress == 1)
// Entry Long Condition
if (Close[0] > mythresholdHigh)
{
EnterLong(DefaultQuantity, "Long 5min");
}
// Entry Short Condition
if (Close[0] < mythresholdLow)
{
EnterShort(DefaultQuantity, "Short 5min");
}
Then I left everything else the same, for what it concerns the Exits.
Could you explain me where is my mistake?
Thank you

Comment