help for use un exactly price for ea

 

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

 
montolieu:


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




 
Reshetov:

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




 
thank you, i go to try. I search since a long time ago, but it's so hard when you are very bad in english ;)