Topics

Forum Topics not found

Replies

barnettariana75
22 Jul 2024, 10:06 ( Updated at: 13 Aug 2024, 09:05 )

@boxing random I revised your code

PendingOrder order;
double slPrice = Your_SL_Price;
double entryPrice = order.TargetPrice;
double priceDiff = order.TradeType == TradeType.Buy ? entryPrice - slPrice : slPrice - entryPrice;
double pipGap = priceDiff / Symbol.PipSize; // Calculate pip difference

ModifyPendingOrderAsync(order, order.TargetPrice, pipGap, order.TakeProfitPips);


 


@barnettariana75