You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Thanks for the reply, Igor, I've figured it out. I use your functions separately as well, but I wanted to take advantage of the library at the stage of EA development.
I looked how komposter' s trade_lib&info_lib library is made and made some changes in yours for my own use.
1. I have removed in all libraries #property library and #include library cross-links, renamed libraries not to be confused.
2. I have made a block of direct calls of all the libraries.
Now all functions of all the libraries are available, there are no errors and criminal messages during compilation, except for normal "is not referenced...".
All extern EAs are available, no problems.
Write more, we will connect and use. First of all I would like to see trailing function by total profit.
The WeekOfMonth() function.
This function returns the week of the month by date. Accepts only one optional parameter:
SZY. Attached is a script to test WeekOfMonth() function.
Hello, Igor! Thank you very much for your useful features! I'm using them as much as I can! I've only recently got into this myself, so a question for you... I've been using them for a long time now, so I've been using them for a long time now. I'm using your function OpenPosition, maybe it`s reacting to an error or something? Here's the log from yesterday, everything was fine before that! can't find error 220........ anywhere
07:47:28 MetaTrader 4.00 build 220 started (MetaQuotes Software Corp.)
07:47:28 Expert open prob USDJPY EURUSD,M1: loaded successfully
07:47:32 '1262868': login
07:47:44 '1262868': login
07:49:40 '1262868': login
07:49:46 '1262868': login
07:54:44 '1262868': connect failed [No connection]
11:38:16 Expert open prob USDJPY EURUSD,M1: removed
11:38:18 MetaTrader 4.00 build 220 stopped
14:05:05 MetaTrader 4.00 build 220 started (MetaQuotes Software Corp.)
14:05:05 Expert open prob USDJPY EURUSD,M1: loaded successfully
14:05:10 '1262868': login
14:05:31 '1262868': login
14:06:39 '1262868': login
14:06:46 '1262868': login
15:57:06 '1262868': connect failed [No connection]
18:30:46 Expert open prob USDJPY EURUSD,M5: removed
18:30:49 Main pumping: timeout on stop
18:30:52 Main pumping: timeout on stop
18:30:55 Main pumping: timeout on stop
18:30:58 Main pumping: timeout on stop
18:31:01 Main pumping: timeout on stop
18:31:01 Main pumping: terminated
18:31:02 MetaTrader 4.00 build 220 stopped
18:31:02 MetaTrader 4.00 build 220 stopped because system shutdown
18:47:57 MetaTrader 4.00 build 220 started (MetaQuotes Software Corp.)
18:47:58 Expert open prob USDJPY EURUSD,M5: loaded successfully
18:48:01 '1262868': connect failed [No connection]
18:48:10 '1262868': login
18:48:20 '1262868': login
20:19:00 '1262868': login
20:19:07 '1262868': login
20:20:05 '1262868': login
20:20:13 '1262868': login
20:59:29 '1262868': login
20:59:39 '1262868': login
21:02:16 '1262868': login
21:02:41 '1262868': DataCenter connecting failed [6]
22:08:40 '1262868': ping failed
22:08:43 '1262868': login
22:08:49 '1262868': DataCenter connecting failed [6]
22:1001 '1262868': login
22:10:05 '1262868': DataCenter connecting failed [6]
22:14:59 '1262868': login
22:15:13 '1262868': login
22:15:22 '1262868': DataCenter connecting failed [6]
22:37:16 '1262868': login
22:37:27 '1262868': DataCenter connecting failed [6]
22:4051 '1262868': login
22:41:04 '1262868': DataCenter connecting failed [6]
23:17:14 Expert open prob USDJPY EURUSD,M5: removed
23:17:16 Expert open prob USDJPY EURUSD,M5: loaded successfully
23:25:52 Expert open prob USDJPY EURUSD,M5: removed
23:25:55 MetaTrader 4.00 build 220 stopped
23:25:59 MetaTrader 4.00 build 220 started (MetaQuotes Software Corp.)
23:26:05 '1262868': login
23:26:05 Expert open prob USDJPY EURUSD,M5: loaded successfully
23:26:15 '1262868': login
23:27:19 '1262868': login
23:27:34 '1262868': login
23:28:20 Expert open prob USDJPY EURUSD,M5: removed
23:28:25 Expert open prob USDJPY USDCHF,H4: loaded successfully
23:28:33 Expert open prob USDJPY USDCHF,H4: removed
Thanks a lot in advance!
Igor, is there no function that would close all positions starting from those that have a larger lot?
wasn't... wrote...
The ClosePosBySortLots() function.
This function closes positions in order of sorting by lot size. That is, using this function, you can close positions in ascending or descending order of lots sizes. Function ClosePosBySortLots() accepts the following optional parameters:
SZY. Attached is a script to test ClosePosBySortLots() function.
The AddLeadingZero() function.
This function adds as many leading (left) zeros "0" to the string so that the string length becomes equal to some given value. The AddLeadingZero() function takes the following mandatory parameters:
SZU. Attached is a script to test AddLeadingZero() function.
The toTime() function.
This function converts two/three integers into a string in time format. If two numbers are passed into the function, the first will be used as hours and the second as minutes. The format string returned will be "HH:MM". If there are three numbers, the third will be replaced by the seconds and the function will return the "HH:MM:SS" string. The toTime() function accepts the following optional parameters:
ZS. Attached is a script to test toTime() function.
Igor, could you suggest a function that would give a corresponding signal when the price matches one of the variables, say b=1.2400, s=1.2300;
If b=price sig=1, if s=price sig=-1.
I apologise for the sloppiness).
Sorry, I'm not Igor. But maybe this will help.
I apologise too. >> it's more accurate.
..I'll be deleting my posts by tonight so as not to clutter up the thread...
No need. It will be useful to have a look, it will wake you up to the idea that the exact price value is not consistently caught.