This website uses cookies to enhance site navigation, analyze site usage, and assist in our marketing efforts. By clicking “Accept All” you are providing your consent to our use of all cookies. Alternatively, please provide your choice by pressing “Customize Cookies”. For more information, please read our Privacy policy
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