[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 384

 
Good afternoon, could you tell me if there is a simple EA based on two averages? Without any filters, trailing stops or anything like that. That is, if the short one crosses the long one from the bottom upwards, a buy order is opened and a sell order is closed; and vice versa, if the short one crosses the long one from the top downwards, a sell order is opened and a buy order is closed.
 
first_may:
Good afternoon, could you tell me if there is a simple EA based on two averages? Without any filters, trailing stops or anything like that. That is, if the short one crosses the long one from the bottom upwards, then a buy order is opened and a sell order is closed; and vice versa, if the short one crosses the long one from the top downwards, then a sell order is opened and a buy order is closed.
See Codebase in the EAs section.
 
paladin80:
See Codebase in the Advisors section.

Before asking my question, I looked there, that's why I asked, without any filters, trailing stops or anything like that. The thing is that I can open an order by conditions, but I don't know how to close the opposite order at the same time.
 
first_may:

Before asking my question, that's where I looked, that's why I asked, without any filters, trailing stops or anything like that. The thing is, I can open a conditional order, but I don't know how to close the opposite order at the same time.

In MT4 there is an EA of Moving Average without SL and TP, but how can I close an order without SL in case of a bust?
 

I am writing an owl which opens an order with SL and TP.

I need a condition that if an order is closed on TP or closed by a trader, I need to stop the EA from executing. How to implement this programmatically?

 
eropov:

I am writing an owl which opens an order with SL and TP.

I need a condition that if an order is closed on TP or closed by a trader, I need to stop the EA from executing. How to implement this programmatically?


If closed by the trader, he can also press the button at the top, and for TA programmatically see Documentation:

https://docs.mql4.com/ru/trading/OrderSelect with MODE_HISTORY in this case:

https://docs.mql4.com/ru/check/IsStopped

 

Hi all!!! I want to ask you a question: When I download a quotes history for a certain period in the quotes archive, sometimes months appear on a chart of a downloaded symbol that distorts the behavior of indicators, but it is corrected by a simple update in the context menu of the symbol. How can I change it? Thanks in advance for the answer!!!

 
Las-tochka:

Hi all!!! I want to ask you a question: When I download a quotes history for a certain period in the quotes archive, sometimes months appear on a chart of a downloaded symbol that distorts the behavior of indicators, but it is corrected by a simple update in the context menu of the symbol. How can I change it? Thanks in advance for the answer!!!


Why do you need past quotes, and even more accurately? We are working on future quotes! And we can check the TS, the ideas and the Expert Advisor on any quotes, even on wrong ones. If the Expert Advisor shows a positive result in any part of time with correct and wrong quotes, then it's a thing! And there is no guarantee that we will have to redo everything again very soon! Be patient, there will be a result! Slacken off a bit and something gets mixed up again for the bad dancer!
 

Folks, please advise...

The OrdersTotal() function determines the number of open trades.

How do I write it so that under

1 buy trade may be opened in case of the_1 condition

and in case of

subject_2 open no more than 1 sell

so if buy is closed at TP, then buy 1 is open again at condition_1, and sell works up to TP

and the same only with sell...?

the script is looking for 2 conditions at once...

 
borilunad:

And why do we need past quotes, and why do we need accurate ones?! We are working on future quotes! And the TS, ideas and the Expert Advisor can be tested on any quotes, even on wrong ones. If the Expert Advisor shows a positive result in any part of time with correct and wrong quotes, then it's a thing! And there is no guarantee that we will have to redo everything again very soon! Be patient, there will be a result! Slack off a bit, and again something bad for the bad dancer!

Just because you don't need them doesn't mean nobody else will. The question was not on what kind of quotes to test ideas?! The question is how to make these quotes without missing 5, 7 months of history, which distorts the quotes picture. Without updating charts when switching to different timeframes. So for the future, if you don't know the answer to the question you asked in the "Any newbie question not to clutter up the forum" thread, please don't clutter up the forum with useless platitudes in order to answer anything.
Reason: