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); }
MetaEditor5と迷っていませんか?
MT4で取引し、職場のパソコンとストレージ経由でコードを同期しています。MetaEditor4上のVaultを起動させています。
MT5とMT4でログインが違うのですか?
MT5とMT4のログインは別々ですか?
MT5とMT4のログインが違いますか?
MT4で、ここ5shのフォーラムと同じようにログインとパスワードを入力しました。
なぜクラスオブジェクトは グローバルに作成されないのですか?
'CBaseClass' - 型のない宣言 !Draft.mq5 12 1
そういうことなんです。
そういうことなんです。
というか、こんな感じ?I.e. クラスの記述は、オブジェクトが作成さ れる前に厳密にしておく必要があるのでしょうか?
ありがとうございます。
まあ、クラス定義を一番下に置いておきたい場合のために、うまくいくように書きました。
そうなんですか?I.e. クラスの記述は、オブジェクトが作成さ れる前に厳密にしておく必要があるのでしょうか?
まあ、クラス定義を一番下に置いておきたい場合のために、動作するように書いておきました。
この場合、エラーが検出されます
'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);
}