symbol.ask and pensing order
symbol.ask and pensing order
08 Aug 2023, 12:37
PlaceStopOrder(TradeType.Buy, SymbolName, volumeInUnits, Symbol.Bid + 0.0003, "Ordine");
foreach (var order in PendingOrders)
{
if (order.Label == "Ordine")
{
if(Symbol.Ask> 12*order.StopLimitRangePips)
{
double newPrice = Symbol.Ask + 5 * Symbol.PipSize;
ModifyPendingOrder(order, Symbol.Bid + 0.0003, null,20);
//metto il tp a 20 pips
}
}
}
I want that when the price exceeds the entry price of the placestoporder by 12 pips, the placestoporder is changed
I'm using 12*order.StopLimitRangePips but I think is wrong
thanks
PanagiotisChar
09 Aug 2023, 05:28
Hi there,
It's wrong. Try
foreach (var order in PendingOrders)
{
if (order.Label == "Ordine")
{
if(Symbol.Ask> order.TargetPrice + (Symbol.PipSize * 12))
{
double newPrice = Symbol.Ask + 5 * Symbol.PipSize;
ModifyPendingOrder(order, Symbol.Bid + 0.0003, null,20);
//metto il tp a 20 pips
}
}
}
Aieden Technologies
Need help? Join us on Telegram
@PanagiotisChar