I have (for me) intriguing idea after taking a long look at how the SetStopLoss was having my automated strategy trades finish: it looks like there could be another 3 or more ticks of profit .
I tried just adding another 3 ticks to the calculation I was using, with a small amount of success (ie same# of trades are taken, small increase in net points) but if I try to make the process into a ExitLongLimit the results are not any more fruitful
// Adjust TrailLong Exit
double TRAILtickAdjustLONG = 0;
//
if ( (BarsSinceEntry(0, "",0)) >= iTrailStartBarNum )
{ // Rule#1 uptrending flat for 3 bars in a row
if( iTrailUseTSr1 == 1 && sTrailSS[0] == 1 && vTrailCt >= 3)
TRAILtickAdjustLONG++;
// Rule#2 uptrending flat for 2 bars in a row
if( iTrailUseTSr2 == 1 && sTrailSS[0] == 1 && vTrailCt >= 2)
TRAILtickAdjustLONG++;
// Rule#3 EXIT DOWNtrending
if( iTrailUseTSr3 == 1 && sExitSS[0] == -1)
TRAILtickAdjustLONG++;
//
tVars.cStopLossTicks -= TRAILtickAdjustLONG;
// this is the code I substituded for the SetStopLoss() line
// if ( Low[0] <= (Position.AvgPrice - tVars.cStopLossTicks * vTickMult))
// ExitLongLimit( (Position.AvgPrice - tVars.cStopLossTicks * vTickMult) + 3*TickSize);
SetStopLoss(CalculationMode.Ticks, tVars.cStopLossTicks * vTickMult + 3*TickSize);
}
}
Any suggestions on how this can be coded effectively?
My guess is that this may apply to several people that use SetStopLoss.
TIA!
Jon

Comment