USING FOUR ARROW KEYS AND CLICK ON CHART TO PLACE BUY OR SELL ORDER ONLY

- Function to continually close positions per ticket per conditions
- Help me please about code MT4 Button
- Help me fix this code pls
Hello,
Something doesn't look right here.
void BOTH_ORDERS_EXECUTED() { if(OrdersTotal()==0) { GlobalVariableSet(AccountNumber(),AccountBalance()+10); Points=OrderSend(Symbol(),0,0.1,OrderOpenPrice(),3,0,0,"AUTO BUY",0,0,clrNONE); OrderPrint(); GlobalVariableSet("BUY VOLUME",OrderLots()); Points=OrderSend(Symbol(),1,0.1,OrderOpenPrice(),3,0,0,"AUTO SELL",0,0,clrNONE); OrderPrint(); GlobalVariableSet("SELL VOLUME",OrderLots()); } if(OrdersTotal()>0) {MessageBox("WILL NOT EXECUTE THERE IS "+OrdersTotal()+" RECORD");} }
I think Points needs to be (int Points;) not bool.
GlobalVariableSet(AccountNumber(),AccountBalance()+10);
I haven't used GlobalVariableSet before. I usually do this.
I not sure what +10 is meant to do, but if works so be it.
double Acc = AccountBalance(); int AccNum = (AccountNumber());
Hello,
Something doesn't look right here.
I think Points needs to be (int Points;) not bool.
I haven't used GlobalVariableSet before. I usually do this.
I not sure what +10 is meant to do, but if works so be it.
Points=OrderSelect(0,SELECT_BY_POS); : if(OrdersTotal()==0){ : Points=OrderSend(Symbol(),0,0.1,OrderOpenPrice(),3,0,0,"AUTO BUY",0,0,clrNONE); OrderPrint(); GlobalVariableSet("BUY VOLUME",OrderLots()); |
|