Greetings esteemed community! Please advise, is it possible to save an array of class objects to a file? Or do they need to be converted to an array of structures to save them to a file?
BlackTomcat: Greetings esteemed community! Please advise, is it possible to save an array of class objects to a file? Or to save them to a file, should they be converted to an array of structures?
Thank you, I'll give it a try. If it doesn't work, I'll come back with another question. :) If I understand correctly, then all information about the class methods is cut off?
Alexey Volchanskiy: There is no Fibonacci indicator beginning with "i", it is hidden in the graphical objects. E_Ghazaryan, look through the Help file via this path. There is an example in MQL4 Reference / Standard constants, enumerations and structures / Object constants / Object types / OBJ_FIBO
The help is silent, on the website they say it's expiry date in bars. I've searched from 1 to 100 and the pending does not expire on its own.
I have never worked with pending orders. (I have never worked with pending orders before in my EA)
Why read such nonsense? Just try to manually place a pending order and set an expiry time for it.
You will see right away that you don't set the time in relation to something, in bars, minutes or seconds; you set a specific time for removing the pending order. The only remark is that the time of expiration cannot be closer than ten minutes from the order opening time. The time loss at order opening must be taken into consideration.
Why read such nonsense? Just try manually placing a pending order and setting an expiry time.
...
You should not be so reckless. The matter is that when an EA is generated using MQL5 Wizard, there is an expiry parameter and it is actually measured in bars:
//+------------------------------------------------------------------+//| тест.mq5 |//| Copyright 2015, MetaQuotes Software Corp. |//| https://www.mql5.com |//+------------------------------------------------------------------+#property copyright"Copyright 2015, MetaQuotes Software Corp."#property link"https://www.mql5.com"#property version"1.00"//+------------------------------------------------------------------+//| Include |//+------------------------------------------------------------------+#include <Expert\Expert.mqh>
//--- available signals#include <Expert\Signal\SignalAC.mqh>
//--- available trailing#include <Expert\Trailing\TrailingNone.mqh>
//--- available money management#include <Expert\Money\MoneyFixedLot.mqh>
//+------------------------------------------------------------------+//| Inputs |//+------------------------------------------------------------------+//--- inputs for expertinputstring Expert_Title ="тест"; // Document nameulong Expert_MagicNumber =31146; // bool Expert_EveryTick =false; // //--- inputs for main signalinputint Signal_ThresholdOpen =10; // Signal threshold value to open [0...100]inputint Signal_ThresholdClose=10; // Signal threshold value to close [0...100]inputdouble Signal_PriceLevel =0.0; // Price level to execute a dealinputdouble Signal_StopLevel =50.0; // Stop Loss level (in points)inputdouble Signal_TakeLevel =50.0; // Take Profit level (in points)inputint Signal_Expiration =4; // Expiration of pending orders (in bars)inputdouble Signal_AC_Weight =1.0; // Accelerator Oscillator Weight [0...1.0]//--- inputs for moneyinputdouble Money_FixLot_Percent =10.0; // Percentinputdouble Money_FixLot_Lots =0.1; // Fixed volume//+------------------------------------------------------------------+//| Global expert object |//+------------------------------------------------------------------+
The physical meaning of the signal expiration in bars: if the signal (pending order) does not trigger within a specified number of bars, this order will be deleted.
You shouldn't be so reckless. The thing is that when generating an EA using MQL5 Wizard, there is an expiration parameter, and it is actually measured in bars:
The physical meaning of expiration in bars: if the signal (pending order) does not trigger within a given number of bars, this order will be deleted.
The number of bars should be converted into a time and passed to the open function.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Please advise, is it possible to save an array of class objects to a file? Or do they need to be converted to an array of structures to save them to a file?
Greetings esteemed community!
Please advise, is it possible to save an array of class objects to a file? Or to save them to a file, should they be converted to an array of structures?
Maybe.
There is no Fibonacci indicator beginning with "i", it is hidden in the graphical objects. E_Ghazaryan, look through the Help file via this path. There is an example in MQL4 Reference / Standard constants, enumerations and structures / Object constants / Object types / OBJ_FIBO
If I understand correctly, all information about the class methods is stripped out?
The help is silent, on the website they say it's expiry date in bars. I've tried everything from 1 to 100, the pending does not expire on its own.
I have never worked with pending orders. (I have never worked with pending orders before in my EA)
The help is silent, on the website they say it's expiry date in bars. I've searched from 1 to 100 and the pending does not expire on its own.
I have never worked with pending orders. (I have never worked with pending orders before in my EA)
The help is silent, on the website they say it's expiry date in bars. I've searched from 1 to 100 and the pending does not expire on its own.
I have never worked with pending orders. (I have never worked with pending orders before in my EA)
Why read such nonsense? Just try to manually place a pending order and set an expiry time for it.
You will see right away that you don't set the time in relation to something, in bars, minutes or seconds; you set a specific time for removing the pending order. The only remark is that the time of expiration cannot be closer than ten minutes from the order opening time. The time loss at order opening must be taken into consideration.
Why read such nonsense? Just try manually placing a pending order and setting an expiry time.
...
You should not be so reckless. The matter is that when an EA is generated using MQL5 Wizard, there is an expiry parameter and it is actually measured in bars:
The physical meaning of the signal expiration in bars: if the signal (pending order) does not trigger within a specified number of bars, this order will be deleted.
You shouldn't be so reckless. The thing is that when generating an EA using MQL5 Wizard, there is an expiration parameter, and it is actually measured in bars:
The physical meaning of expiration in bars: if the signal (pending order) does not trigger within a given number of bars, this order will be deleted.