[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 277

 
Valdemar:

Good time to all!

I have an idea that my EA should put two pending orders and then stop working, but so far I have not reached such a result, it keeps opening them for every tick?

I will keep them open at every tick. Thanks a lot!

https://www.mql5.com/ru/articles/1404

Please read "Order Management is Simple", it's very interesting! Should help you develop your approach.

 
Please advise which function in EA is responsible for opening order quantity on one bar. The colours in my EA are very jumpy. Thank you
 
Valdemar:

Good time to all!

I have an idea that my EA should put two pending orders and then stop working, but so far I have not reached such a result, it keeps opening them for every tick?

I am not sure what the result will be but I am sure I will get a good result.

Before placing an order, check if there is an order of the same type already set up... If there isn't, put it in, if there is, arivedery...
 
rusa:
Please advise which function in the EA is responsible for opening an order on one bar, I need to open one order on one bar at each crossing of Maasha. The colours in my EA are very jumpy. Thank you

If the "twitch" MAs have crossed, check if there is already an open position with an opening time corresponding to the bar where the "twitch" MAs have crossed. If not, open it.

SZS. Feed the MASHKs - maybe they are hungry... :))

 
rusa:
Please advise which function in the EA is responsible for opening a number of orders on one bar, we need one order to be opened on one bar at each crossing of the wands. The colours in my EA are very jumpy. Thank you

Record the time of the placed order

Before placing an order , please check the iTime of the current bar to make sure it is higher than the recorded time.

 
Valdemar:

Good time to all!

I have an idea that my EA should put two pending orders and then stop working, but so far I have not reached such a result, it keeps opening them for every tick?

I am not sure what the result will be but I am sure I will get a good result.

And it would also be "useful" to look through all the orders to see if they are "theirs" when restarting the Expert Advisor, just in case something is left hanging?
 
Please tell me which parameter is better to apply to ADX, PRICE_HIGH or PRICE_CLOSE - the guides give one, but MT4 defaults to the other.
 
Stells:


I am working on one-minute orders. When a new minute arrives the signal to open an order is cancelled.

Will opening a second terminal and opening one order in each terminal solve the problem?
Or to open a second account and open one order on one account and another on another?
If you open a second terminal on the same account - theoretically it will be faster, if you can respect the simultaneity. If you open a different account, the result will be almost the same, but the principle of trading will change: it all depends on your strategy.
 
Lucius:
Please tell me which parameter is better to apply to the ADX, PRICE_HIGH or PRICE_CLOSE - the guides give one, but MT4 has another by default.
Try, by observation, to identify the cyclic behavior of the specific timeframe and dance from there. The visualization mode of the tester can help you. Start an "empty" Expert Advisor, overlay the required indicator on the visualization chart, and then, step by step (F12) or at low speed, mark the best entries and exits according to your TS, if necessary, press pause, change the parameters and go on. In general, the selection of indicator parameters to the current market nature is the purpose of expert advisor optimization (in general). 8-)
 

Repeating the question, it has gone unheeded:

How do I display a request message in Print? Here is an example of messages from the log:

2011.10.19 13:04:11 '183927376': order buy 0.01 EURGBP opening at 0.8768 sl: 0.0000 tp: 0.8822 failed [trade timeout]

2011.10.19 13:00:52 '183927376': request in process

for 3.5 min there was no connection to the server.

My EA is displaying all the error messages. But this one remains without any reaction from EA. I want to fix the time of no connection in seconds.

Then it would be possible to record a general index of quality of connection with the server: the ratio of time lapses to total time - would give a percentage index of server inactivity.