Scripts: Pending orders DOWN - page 4

 
Thank you very much Vladimir, you really are a genius. God bless you
 
How I can Add Multiple Pending Orders based on time in seconds

Suppose If I have to trade on a specific time(in seconds) every minute. Also Need to Close that trade in that minute only at specific time(in seconds to be exact). How I can do that, please somebody Help me in this.
Either I need to make a EA in MT5 to open trade at a specific time irrespective of any hour i.e. it should open at specific send of every minute and also close trade after specific seconds.
or
I should be adding the pending orders of Start trade and Close trade also.

How to do this I have made a lot of EA but none of that worked Out. Please help solving this query. Thanks

 
er.arpit09 :
How I can Add Multiple Pending Orders based on time in seconds

Suppose If I have to trade on a specific time(in seconds) every minute. Also Need to Close that trade in that minute only at specific time(in seconds to be exact). How I can do that, please somebody Help me in this.
Either I need to make a EA in MT5 to open trade at a specific time irrespective of any hour i.e. it should open at specific send of every minute and also close trade after specific seconds.
or
I should be adding the pending orders of Start trade and Close trade also.

How to do this I have made a lot of EA but none of that worked Out. Please help solving this query. Thanks

Of course you need an advisor.

 




Hello,
Why doesn't the volume of positions change (in the terminal)? - although it is displayed when you change the parameter before launching, and in the buy version - everything changes ......

I found it:

In order for the script to set the same volume for allpending orders for Buy and Sell, you need to change the code a little bit:

//--- start work DOWN
   start_price_ask=m_symbol.Ask()-m_gep;
   start_price_bid=m_symbol.Bid()-m_gep;
//--- pending orders DOWN
   for(int i=0; i<InpQuantity; i++)
     {
      double price_ask     = start_price_ask-i*m_step;
      double price_bid     = start_price_bid-i*m_step;
      if(InpDownOrders==buy_limit)
        {
         double sl         = (ExtStopLoss==0.0)   ? 0.0 : price_ask - ExtStopLoss;
         double tp         = (ExtTakeProfit==0.0) ? 0.0 : price_ask + ExtTakeProfit;
         m_trade.BuyLimit(m_symbol.LotsMin(),m_symbol.NormalizePrice(price_ask),m_symbol.Name(),    // m_symbol.LotsMin() should be changed to InpLots
                          m_symbol.NormalizePrice(sl),
                          m_symbol.NormalizePrice(tp));
        }
      else
        {
         double sl         = (ExtStopLoss==0.0)   ? 0.0 : price_bid + ExtStopLoss;
         double tp         = (ExtTakeProfit==0.0) ? 0.0 : price_bid - ExtTakeProfit;
         m_trade.SellStop(m_symbol.LotsMin(),m_symbol.NormalizePrice(price_bid),m_symbol.Name(),    // m_symbol.LotsMin() should be changed to InpLots
                          m_symbol.NormalizePrice(sl),
                          m_symbol.NormalizePrice(tp));
 
Vladimir Pristai:




Hello,
Why doesn't the volume of positions change (in the terminal)? - although it is displayed when changing the parameter before launching, but in the buy version everything changes ......

Found it:

In order for the script to set the same volume for allpending orders for Buy and Sell, you need to change the code a little bit:

Forum on trading, automated trading systems and testing trading strategies

Scripts: Pending orders DOWN

Vladimir Karputov, 2018.12.15 19:41

In this series, the original idea was to use exactly the minimum lot. Therefore, so far only like this.


 

Hello Vladimir.

Please add to the input parameters of your script the parameter: indent from the specified price, where the desired price from which the pending order will be set will be specified.

It will turn out to be a great universal script.

 
alexniko38:

Hello, Vladimir.

Please add to the input parameters of your script the parameter: indent from the specified price, where the required price will be specified from which the pending order will be set.

It will turn out to be a great universal script.

  • Gap for pending orders UP from the current price (in pips) - the gap from the current price for the first pending order;
 

I can't send batches of more than 1 unit. How can I solve it?

Thank you

 
psrs55 :

I can't send batches of more than 1 unit. How can I solve it?

Thank you

Download version 1.003 from the Russian part of the forum: Pending orders DOWN:

Pending orders DOWN
Pending orders DOWN
  • www.mql5.com
Скрипт выставляет несколько отложенных ордеров вниз от текущей цены.
 

Thank you very much. it's working very well>