Scripts: Pending orders UP

 

Pending orders UP:

The scripts places multiple pending orders higher than the current price.

Author: Vladimir Karputov

Pending orders UP
Pending orders UP
  • www.mql5.com
The "Pending orders UP" script sets a grid of orders above the current price. Input Parameters Gap for pending orders UP from the current price (in pips) - the distance from the current price to place the first pending order. Step between orders UP (in pips) - distance between pending orders. Type of pending orders UP - the type of the pending...
 

There is an error in the script because it does not changes the volume only opens 0.01 lot

Could someone help with this.

 
emmysq :

There is an error in the script because it does not changes the volume only opens 0.01 lot

Could someone help with this.

Version 1.003 is published (the new version is available only on the Russian forum )

 
I am testing with ICMarkets demo which allows maximum 200 pending orders. When running this script, the maximum pending orders it will submit is 60? Any ideas why?
 
ericy :
I am testing with ICMarkets demo which allows maximum 200 pending orders . When running this script, the maximum pending orders it will submit is 60? Any ideas why?

So the current character has a limitation. Or you already have pending orders on your trading account. In any case, you need to read the "Journal" tab of the terminal.

And pay attention that:

Forum on trading, automated trading systems and testing trading strategies

Scripts: Pending orders UP

Vladimir Karputov, 2019.07.22 09:27

Version 1.003 is published (the new version is available only on the Russian forum )


 
There was no error in the journal. However when I put Sleep(500) before m_trade and now it allowed 79 orders and the rest with error [Position limit reached]. Can you test with 100 quantity and you may see the same.
 
ericy :
There was no error in the journal. However when I put Sleep(500) before m_trade and now it allowed 79 orders and the rest with error [Position limit reached]. Can you test with 100 quantity and you may see the same.

" Position limit reached" - the trading server informs you that you are very rashly bombarding the server with trade requests. You are trying to place VERY MUCH pending orders. Therefore, the trading server hits your hands.

 
I've tried Sleep(1000), the same error happened. Any idea how to get around this error and place 200 pending orders?
 
ericy :
I've tried Sleep(1000), the same error happened. Any idea how to get around this error and place 200 pending orders ?

There is only one recipe: to reduce your greed and not try to place many pending orders.

 
I have similar code in MT4 which has no problem for 200 pending orders. Do you think it is MT5 issue?
 
ericy :
I have similar code in MT4 which has no problem for 200 pending orders . Do you think it is MT5 issue?

I'm tired of repeating the same thing: do not be greedy, do not break the limits.

You violate the limits and this is visible in the messages in the "Journal" tab. The trading server directly tells you - you are greedy and act illogically.


This is the last warning.