Forum

Some question about Pointer

//+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ class CAbaco { public : int m_int; CAbaco() {}

Help with pseudo multi inheritance

I've built a pseudo inheritance since mql doesn't allow this, here's what i did. //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ class

Observer Pattern

Hello everyone, i'm tryng to implement the Observer Pattern as described here (https://www.tutorialspoint.com/design_pattern/observer_pattern.htm) but i'm failing really hard. This is what i coded #include <Object.mqh> #include "Subject.mqh"

Array of Struct Sort using standard LIbrary

Hello, is there a way to sort a struct based on an element inside it? struct MyStruct { double _High[]; double _Low[]; string Symbolname; }; MyStruct Str[]; int Size= 10 ; ArrayResize (Str,Size); for ( int i= 0 ;i<Size;i++)

Loading More History Before Running EA

Hello guys, i'm building an ea that store PERIOD_M30 mqlRates structure for different symbol and do some statistical calcualtion, the problem currently is that i need approx 10 000 bar laoded to make my calculation, but the graph has more or less 2000 bars when you laod it the first time or you

Help me understand this EA

Hello, i'm pretty new to programming, i'm studiyng a Renko Expert Advisor, it converts a normal chart in a Renko chart. File is attached, i'm understanding pretty much everything, expect this: void UpdateChartWindow() { if (hwnd == 0 ) { hwnd = WindowHandle (sSymbolName, RenkoTimeFrame);

Calculation Incorrectness??

void OnStart () { double Lots=(( 1860.03 * 1.0 / 100 )/( 114.542 - 114.511 ))/( 0.87 / 0.001 ); double NormLotsRound= MathRound (Lots/ 0.01 )* 0.01 ; double NormLotsDouble= NormalizeDouble (Lots, 2 ); Print ( "Lots is, " ,Lots); Print ( "MathRound(Lots/0.01) is, " , MathRound (Lots/ 0.01

MODE_STOPLEVEL Problem

As title says, i'm having some problem placing BUYSTOP/SELLSTOP order sometimes, i get Error 130 (ERR_INVALID_STOPS), probably related to MarketInfo ( "EURUSD" , MODE_STOPLEVEL ) . My broker return 0 as value from MarketInfo ( "EURUSD" , MODE_STOPLEVEL ), i tried to correct the OrderSend price

Order Close error 138 BACKTEST

Hello, i'm getting this error only in BACKTESTING, here's a pic. As you can see i'm trying to close a Basket when a when an opposite signal is generated. Here's the OrderClose() code for Sell orders, the same for Buy orders for ( int i= 0 ; i< OrdersTotal (); i++) { if (

#property indicator_type / SetIndexStyle, DRAW_COLORCANDLE question!

I'm making an Indicator that recognize candle, trying to paint the candle and i see that there's a DRAW_COLORCANDLE option, but nothing on Documentation to help me understand how it works. Right now i'm using histogram like the file in here (https://www.mql5.com/en/code/10623) . But the main