Daniel Alarcon / Publications
Forum
Variable `i` already defined?
How come is i already defined since i is part of for scope, does anyone know about this? I know the fix, but this has never happened to me once, and from some time ago, it just doesn't stop.. Thanks! void OnTick () { for ( int i = 10 - 1 ; i >= 0 ; i--) { Print (i); } for ( int i =
How do i get Deposits and/or Profits
Hi! so I've read some posts that make something like this for ( int i= 0 ; i < OrdersHistoryTotal(); i++) { if ( OrderSelect (i, SELECT_BY_POS, MODE_HISTORY) && OrderType() == 6 ) { deposits += OrderProfit(); } } Improperly formatted code edited by moderator. But for my case, history only
MQL4 importing a C# DLL
Hi everyone! Hope you guys are fine. To summary, - I created a C# DLL that has a class called `Utils` and a method `public static int GetNumber(string number);` that parses string to int. - The DLL name is Parser.dll and it is in MQL4 libraries folder. - In MQL4 I just do #import "Parser.dll" int
Positions parameter - Common Tab EA
Hi, So I'd like to get the value of Only Shorts , Only Longs, Both on my script. This will help me a lot to take decisions on my EA. I've tried the SYMBOL_TRADE_MODE but it says it's FULL_MODE not the current mode. Does anyone would like to help me? Thanks in advance! MQL4