would it be possible to have the stop to break even code take place first and then the trailing stop code to take over?
If you have a solution please let me know. I'm open to new ideas. thanks.
i have this stop to break even code:
else if (Position.MarketPosition == MarketPosition.Long)
{
if (Close[0] > Position.AvgPrice + 3* TickSize)
{
SetStopLoss(CalculationMode.Price, Position.AvgPrice);
}
}
else if (Position.MarketPosition == MarketPosition.Short)
{
if (Close[0] < Position.AvgPrice - 3* TickSize)
{
SetStopLoss(CalculationMode.Price, Position.AvgPrice);
}
Trailing stop code:
else if (Position.MarketPosition == MarketPosition.Long)
{
{
SetStopLoss(CalculationMode.Price, Close[0] -11*TickSize);
}
}
else if (Position.MarketPosition == MarketPosition.Short)
{
{
SetStopLoss(CalculationMode.Price, Close[0] +11*TickSize);
}
How can I use them together in the same strategy?
please help, im new at this. new ideas welcome.
Thank you
Comment