Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6.
This is the first time I've seen this kind of thing
why do the file icons have a lock on them?
Win 7 does not show them in the specified folder (like they are not there). But these advisors are there and working...
is it because of Program Files 86x ???
On account of $12.93 I want to open an order with 0.01 volume, stop loss and take profit 0, but the program says not enough money-why, what is wrong and where do I need to fix?
Hi! The EA only trades pending orders. Here is a block to delete pending orders that did not open within 2 days after installation:
Due to the EA's strange behavior, I have suggested that the cause lies here. Could you please tell me where it is hidden?
extern double min=1.440; //--------------------------------------------------------+ //-------------------------Old Order Delete-------------------------------+ if(OrdersTotal()<1) {return; } for(int i=OrdersTotal()+1;i>=0;i--) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) { if(OrderSymbol()==Symbol()) { if(OrderType()>1) { if(TimeCurrent()-OrderOpenTime()>min*60) { OrderDelete(OrderTicket()); return; } } } } return;}
Hi! The EA only trades pending orders. Here is a block to delete pending orders that did not open within 2 days after installation:
Due to the EA's strange behavior, I have suggested that the cause lies here. Can you tell me where it is hidden?
extern double min=1. 440; // точка здесь лишняя
Thanks, fixed it! Except the EA is still weird...
Hi! The EA only trades pending orders. Here is a block to delete pending orders that did not open within 2 days after installation:
Due to the EA's strange behavior, I have suggested that the cause lies here. Can you tell me where it is hidden?
for(int i=OrdersTotal()-1;i>=0;i--)
The sign is mixed up.
Found it, thanks! If you don't mind, I've been struggling for days with early closures that I don't understand.https://www.mql5.com/ru/forum/142582/page430 I've described them here.
The pending order deletion unit above is part of this EA.
The swap option suggested below on that page does not explain the early stops.
Again I looked in the reference and again read the lines here:
https://docs.mql4.com/ru/basis/preprosessor/import
Для импорта функций во время выполнения mql4-программы используется так называемое позднее связывание. Это значит, что пока не вызвана импортируемая функция, соответствующий модуль (ex4 или dll) не загружается.
I mean, in order for the library to be loaded, it should be called in the code after the import lines, right?
For example, I did it like this:
#import "hoz_Base@Library.ex4" double ND(double A); double Get_TradePrice(int fi_priceId, // Цена: 0 - Ask; 1 - Bid string fs_symbol);
1. It turns out that we declare functions. that we will use in the Expert Advisor at the very beginning of its code?
2. and not to declare them a lot in the code of the Expert Advisor itself and use header files? I.e. only for declarations?
This question came up because I have seen such Expert Advisors that were written by quite serious programmers, but their header files contain all main and non-main functions. I was surprised by this... The reason is that the speed of compiled libraries is much faster, in addition, the code of library functions is "isolated", which is also very convenient.
He just closed the subject... Not a good man.
I have the following question. There is a block in init(), which hangs the terminal (that's what I want to transfer to dll). Naturally, the log cannot be viewed - the terminal is only closed by Ctrl+Alt+Delete. Unprinting in order to trace (and to measure lapse time of loops coming into block) doesn't help - printer doesn't write anything, logging is not even created. I try to use FileOpen/FileWrite with the same purpose - file is just created (0 Kb), and silence. I put FileWrite after FileOpen, on the next line - no effect. What should I do?
This is the first time I encounter such a rubbish
why do i see file icons with lock?
Win 7 does not show them in the specified folder (like they are not there). But these icons are there and they work...
Is it because of Program Files 86x ???
Look, isn't it hidden in the attributes there?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use