Errors, bugs, questions - page 1110

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
Are you confused with MetaEditor5?
I trade on MT4 and synchronise codes via storage with my computer at work. I have the vault on MetaEditor4 running.
Do you have a different login on MT5 and MT4?
Do you have a different MT5 and MT4 login?
Is your MT5 and MT4 login different?
On MT4 I entered the login and password as here on the 5sh forum.
Why isn't the class object created globally?
'CBaseClass' - declaration without type !Draft.mq5 12 1
That's the way to do it.
That's the way to do it.
Or rather like this? I.e. the class description should be strictly before the object is created?
Thank you.
Well I wrote to make it work in case you want to keep the class definition at the bottom.
Is that correct? I.e. the class description should be strictly before the object is created?
Well I wrote it to work in case you want to keep the class definition at the bottom.
In this case an error is detected
'CBaseClass' - struct undefined !Draft.mq5 13 1
#property indicator_separate_window
#property indicator_buffers 10
#property indicator_plots 2
#property indicator_type1 DRAW_COLOR_CANDLES
#property indicator_type2 DRAW_COLOR_CANDLES
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
PlotIndexSetInteger(0,PLOT_LINE_COLOR,0, clrBlue);
PlotIndexSetInteger(0,PLOT_LINE_COLOR,1, clrYellow);
PlotIndexSetInteger(1,PLOT_LINE_COLOR,0, clrGreen);
PlotIndexSetInteger(1,PLOT_LINE_COLOR,1, clrRed);
Print("00 = " + PlotIndexGetInteger(0, PLOT_LINE_COLOR,0));
Print("01 = " + PlotIndexGetInteger(0, PLOT_LINE_COLOR,1));
Print("10 = " + PlotIndexGetInteger(1, PLOT_LINE_COLOR,0));
Print("11 = " + PlotIndexGetInteger(1, PLOT_LINE_COLOR,1));
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int prev_calculated,
const int begin,
const double &price[])
{
//---
//--- return value of prev_calculated for next call
return(rates_total);
}