I want use for my ea a price for exemple for eurusd: 1.4200
If the price cross 1.4200, then my position open
How to do, or what function to use, thanks so much
Use this function:
int OrderSend( "EURUSD", OP_BUYLIMIT, double volume, 1.42, int slippage, double stoploss, double takeprofit, WindowExpertName(), int magic, datetime expiration=0, color arrow_color=CLR_NONE)
See the underlined parameters.
Instead of OP_BUYLIMIT and OP_SELLLIMIT or OP_BUYSTOP or OP_SELLSTOP can be substituted depending on where the current price is relative to 1.42
Orders type for BuyStop and SellLimit is always placed above the current price
Orders type for BuyLimit and SellStop is always placed below the current price
Use this function:
int OrderSend( "EURUSD", OP_BUYLIMIT, double volume, 1.42, int slippage, double stoploss, double takeprofit, WindowExpertName(), int magic, datetime expiration=0, color arrow_color=CLR_NONE)
See the underlined parameters.
Instead of OP_BUYLIMIT and OP_SELLLIMIT or OP_BUYSTOP or OP_SELLSTOP can be substituted depending on where the current price is relative to 1.42
Orders type for BuyStop and SellLimit is always placed above the current price
Orders type for BuyLimit and SellStop is always placed below the current price

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Sorry for my english, i'm french
I want use for my ea a price for exemple for eurusd: 1.4200
If the price cross 1.4200, then my position open
How to do, or what function to use, thanks so much