Need Help (metaeditor)

Back to topics list To post a new topic, please log in or register
underthesun22 2014.09.27 11:54

Hello people,

I need help with the making of a simple program with MetaEditor. The program is simple: it should make an order (for exaxt time) and also move the stop lose line along with the price of the current product. For example i want to make an order to buy 10000 euroes (EUR/BGN) at 19:00 (now is 12:53), and also

if the price is 1.000 and the stop loss is at 0.990, if the price moves up to 1.020 then the stop loss should also move to 1.010. Thank You for the help.

deysmacro 2014.09.27 12:28 #
WHRoeder 2014.09.27 15:27 #
underthesun22: I need help
You have only three choices: Search for it, learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
4x_Gypsy 2014.09.27 19:21 #
//-------------------------------------------------------------------------------------------------Auto Adjust Stop Loss   
void AutoAdjustStopLoss()
//-------------------------------------------------------------------------------------------------Risk Management

   double ATR=iATR(Symbol(),0,atrperiod,1);

   double SL = NormalizeDouble(ATR * 2,Digits);
   double TP = NormalizeDouble(ATR * atrmultiplier,Digits);


   for(int cnt=0; cnt<OrdersTotal(); cnt++)
                  Alert("Auto Buy SL Error Occured : "+ErrorDescription(GetLastError()));
               Alert("Auto Sell SL Error Occured : "+ErrorDescription(GetLastError()));

//-------------------------------------------------------------------------------------------------End Auto Adjust Stop Loss

i have a function that does the same and uses the ATR for setting the stops.

it moves the stoploss with every profitable tick at a per defined distance.

hope it helps

good luck

Back to topics list  

To add comments, please log in or register