Merhaba,
Kodlaması aşağıdaki gibi çalışan çift yönlü işlem yapan bir stratejide robot duraklatılıp tekrar çalıştığında kaldığı yerden devam eder mi yoksa lastorderside gibi koşullar eklenmeli mi? Parabloic sar hazır stratejisinden esinlenerek bu sistemi oluşturdum ve güzel çalışıyor sadece bundan emin olmak istedim.
SendOrderSequential(false);
WorkWithPermanentSignal(true);
if (Position == 0)
{
SendMarketOrder(Symbol, OrderQuantity, OrderSide.Sell, includeAfterSession:false);
TrailingStopLoss(Symbol, SyntheticOrderPriceType.Percent, ShortStopLevel);
Debug("Short pozisyon açıldı.");
Position = -1;
}
else if (Position == 1)
{
SendMarketOrder(Symbol, 2 * OrderQuantity, OrderSide.Sell, includeAfterSession:false);
TrailingStopLoss(Symbol, SyntheticOrderPriceType.Percent, ShortStopLevel);
Debug("Long pozisyondan Short pozisyona geçildi.");
Position = -1;
}