Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1173

 
Сергей Таболин:

They are detrimental to the constructiveness of the dialogue...!

Beautiful!

 

Dear Experts, I need the EA to run through all closed orders during initialization. But the problem is, in order to do this, I need to do some manipulations in the terminal to display the entire history, because usually it is a month or three by default.

And now I have a question. Can I use a programmer to run through all of the trading history, even if the filter is set for a short period?

Thanks in advance for the answers.

 
Pavel Komarovsky:

Dear Experts, I need the EA to run through all closed orders during initialization. But the problem is, in order to do this, I need to do some manipulations in the terminal to display the entire history, because usually it is a month or three by default.

And now I have a question. Can I use a programmer to run through all of the trading history, even if the filter is set for a short period?

Thank you for your answers.

No, you cannot.

 

Good afternoon everyone.

Please help fix the script, it was written back in 2009, but for some reason it stopped working on new versions.

Files:
RiskAdvisor.mq4  12 kb
 
Aleksey Mavrin:

No, you may not.

Can I read where in the DC and the user terminal it is recorded when a market / pending order is opened / closed, when the order type changes from pending to market, when orders are closed / deleted and what happens to these records afterwards? The only thing we have in the docks is the request and the structure of orders/trades/positions. I would like to know the process in more detail))))

 
Valeriy Yastremskiy:

Can I read where in the DC and user terminal it is recorded when a market / pending order is opened / closed, when an order type changes from pending to market, when an order is closed / deleted and what happens to these records afterwards? The only thing we have in the docks is the request and the structure of orders/trades/positions. I would like to know the details of the process )))).

If you fix the information in the documentation with some checks and experiments, we may come to an understanding. And there are a lot of topics on the forum, they would rather use the tags OnTradeTransaction OnTrade, etc.

But all questions to developers about "any other details" received an answer like - everything is already written.

But if you have a specific question - ask.

 
Aleksey Mavrin:

The information from the documentation, if you can consolidate it with experiments and checks, then you can come to an understanding. And there are a lot of topics on the forum that are more likely to fit the tags OnTradeTransaction OnTrade, etc.

But all questions to developers about "any other details" received an answer like - everything is already written.

But if you have a specific question, just ask.

OrderSelect on ticket made earlier. The order is pending. What request to obtain that the order has become market, other than checking the type of order on every tick. In the logs, this time is recorded, but it seems that there is no field for this time in the order structure, or am I wrong? When we change the order type, OrdersTotal() and OrdersHistoryTotal also don't change, if I understand correctly.

The rest seems to be clearer)

 
Hi all. Is there any way to find out all the possible settings fields of an EA? I'm mainly interested in all possible values from dropdown lists in settings. If I save a template with an EA or its settings, when reading such a file, even if the field is a list, I can't understand it.
 
Hello! Can you please tell me how to get Awesome Oscillator values from different timeframes at the same time? I have written this code, but I can only get values from the first handle. The value of the second handle coincides with the first one for some reason, even though I have another timeframe. Please help!

void OnTick()
  {
   double PriceArray[];
   
   int AOhandle = iAO(_Symbol,PERIOD_M15);
   
   ArraySetAsSeries(PriceArray, true);
   
   CopyBuffer(AOhandle, 0, 0, 3, PriceArray);
   
   double AOvalue = NormalizeDouble(PriceArray[0], 6);

 
   double PriceArray1[];
   
   int AOhandle1 = iAO(_Symbol,PERIOD_H1);
   
   ArraySetAsSeries(PriceArray1, true);
   
   CopyBuffer(AOhandle1, 
    1 , 0, 3, PriceArray1);
   
   double AOvalue1 = NormalizeDouble(PriceArray[0], 6);
   
  
   Comment ("Awesome Oscillator Value: ", AOvalue, "\n", "\n",
            "Awesome Oscillator Value: ", AOvalue1);
  }


 

Mikhail:
Здравствуйте! Подскажите пожалуйста чайнику, как получить значения Awesome Oscillator с разных таймфреймов одновременно? Написал вот такой код, но значения удается получить только с первого хендла. Значение второго хендла почему-то совпадает с первым, хотя таймфрейм указан другой. Помогите пожалуйста!

void OnTick()
  {
   double PriceArray[];
   
   int AOhandle = iAO(_Symbol,PERIOD_M15);
   
   ArraySetAsSeries(PriceArray, true);
   
   CopyBuffer(AOhandle, 0, 0, 3, PriceArray);
   
   double AOvalue = NormalizeDouble(PriceArray[0], 6);

 
   double PriceArray1[];
   
   int AOhandle1 = iAO(_Symbol,PERIOD_H1);
   
   ArraySetAsSeries(PriceArray1, true);
   
   CopyBuffer(AOhandle1, 
    1 , 0, 3, PriceArray1);
   
   double AOvalue1 = NormalizeDouble(PriceArray[0], 6);
   
  
   Comment ("Awesome Oscillator Value: ", AOvalue, "\n", "\n",
            "Awesome Oscillator Value: ", AOvalue1);
  }



it happens)) 1 gets very lost in the background of English letters l i etc., it is more convenient to call the suffixes 001, 2... etc. then.

Reason: