Forum

OOP and Indicators

Dears, I am experiencing hard time in using the indicator classes in the library. Regarding OOP, I found first this excellent article, but unfortunatelly the author doesn't use the library to build his indicators in his EA: https://www.mql5.com/en/articles/138 Then I bought the book "Expert Advisor

Every tick "cheats"?

Dears, using the "every tick" option in the strategy tester I got strangely good results. Then when I looked at the help topics I figured out this option may be cheating: "The Calculation of Indicators During Testing In the real-time mode, the indicator values are calculated at every tick. The

Problems in coding Martingale

Dears, Im trying to implement a simple martingale strategy, that is, every time I have a deal with a loss, the next deal will have twice the volume of the previous. I have no clue about why it is not working, I have tryed to work with positions, instead of deal, but got an error message. Thanks in

best result using only wizard

Guys, just a curiosity (or maybe a challenge to the MT5 wizard, or my own skills): what was your best result using only the mt5 wizard? I mean, without editing any code at all. when Im too lazy to develop, somethimes I like to try several possibilities with the mt5 wizard. Even trying all the

Which timeframe?

Hey, guys! Im facing the following decision: what should be the best timeframe for my EA? It is profitable in almost all timeframes (except M1). I prefer to work with greater timeframes (like H12 or D1). First because the spread charged by the broker practically makes no difference (it is very

How important is the use of pointers?

Fellow traders, I just started to learn about pointers in C++ and memory management. My question is: how important is the use of pointers in MQL5? Did anyone experienced any significant difference, for exemple, in testing an EA? Was the test performed faster by the use of pointers? Or there was any

How many lines of code, in average, have your EAs?

Less than 100 between 100 and 300 between 300 and 600 between 600 and 900 between 900 and 1200 between 1200 and 1500 between 1500 and 2000 between 2000 and 3000 more than 3000 (please specify)

UML tools?

Guys, Since my algorithms are becoming a little bit complicated, I started to google for some help about it. Does anyone use any UML tool for you algorithms? Im trying a business process management software (BPMS), I think it serves me well, because it is very flexible. Thanks

Problems with trailing stop

Hi, Guys! Please, I need some help with my trailing stops. I would like to create a rule where, every time the close of yesterday is greater than the close of the day before, the stop moves an amount equal to the range of the last bar (that is, newstop = laststope + (previoushigh - previouslow))

Closing long positions

Hi! Im new in the MQL world, with little knowledge of C# only... Looking at the Order Types (in: https://www.mql5.com/en/docs/constants/tradingconstants/orderproperties#enum_order_type), I had a doubt. Is there a order type for closing long positions? As I understood the ORDER_TYPE_SELL is for