Fire and forget

 

Is there a script that does the following:

If price equals A, set (buy or sell - a bool function) order at price B with a tp and sl

Is it possible to write one if you haven't got one similar?

 

Scripts created by Igorad.

Open it in MetaEditor for the settings explanation.

Files:
 
extern int Order_Type = 0; // 0- Current Price; 1 - SELLSTOP; 2 - SELLLIMIT

extern double Lots = 1;

extern double Price = 0;

extern double Distance = 0; // Distance from current price in pips for pending orders

extern int TakeProfit = 0; // TakeProfit in pips

extern int StopLoss = 0; // StopLoss in pips

extern int Slippage = 3;

extern string Comments ="SELL";

extern int Magic = 0;

If I understand correctly, I should set "Price" to whatever value I need (price A in my initial description). I'll test it. Thank you very much for your help!

 
DanielTyrkiel:
If I understand correctly, I should set "Price" to whatever value I need (price A in my initial description). I'll test it. Thank you very much for your help!

As I understand the "Price" is for stop orders.

It is very good script created by Igorad because we may open trades manually with any magic number selected.

 

This EA is very interesting to me. It would allow for you to "hide" your pending orders as well as TP and SL from your broker.

Question is, when you use it to buy gbp/usd at 2.0000 how do you keep it from opening multiple orders as price danced around 2.0000, or say your TP or SL was hit will it open another order if price runs over 2.0000 again?

Is there any way to have it work like mouse trap, so to speak, so that it only works once before you have to reset it?