Forum

how to store a Bid Ask price when condition hits?

I tried to lock the bid price but it did not work if (price> 0 && Ask<=price-70pips) { OrderSend ( Symbol (),OP_BUY,0.01,Ask,slippage,sl, tp,"",Magic, 0 ,Blue); } I dont want the condition to execute first..i want it to capture the price first and when the price is below 70 pips then it trigger the

How do i close some of the multiple open order?

int Pos_Order_Ticket[ 1 ]; int TotalOrders = OrdersTotal (); if ( ArrayResize (Pos_Order_Ticket, TotalOrders) == TotalOrders) { for (i = TotalOrders - 1 ; i >= 0 ; i--) { if ( OrderSelect (i, SELECT_BY_POS, MODE_TRADES)) { Pos_Order_Ticket[i] =

how to count virtual buy sell trade

int totalorder( int m) { int total= 0 ; for ( int i= 0 ; i< OrdersTotal (); i++) { if (! OrderSelect (i,SELECT_BY_POS,MODE_TRADES)) continue ; if (OrderSymbol()!= Symbol () || OrderMagicNumber()!=MagicNumber || OrderType()!= m) continue ; total++; } return (total); }

How:Order Modify Take Profit.

void OrderTPNModify( int m) { int ticket; double fixTP,dtp; fixTP= 0 ;dtp= 0 ; for ( int i = 0 ; i < OrdersTotal (); i++) { if (! OrderSelect (i, SELECT_BY_POS, MODE_TRADES)) continue ; if (OrderSymbol() != Symbol ()|| OrderMagicNumber() != Magic ||OrderType() != m) continue ;

HELP ...Change multiplier lot to +1

Hi, i need to chage the multiplier by increasing +1. like this 0.01,0.02,0.03,0.04...++ double NR(double thelot) { double maxlots = MarketInfo(Symbol(), MODE_MAXLOT), minilot = MarketInfo(Symbol(), MODE_MINLOT), lstep = MarketInfo(Symbol(), MODE_LOTSTEP); double lots = lstep *