初心者の方からの質問 MQL5 MT5 MetaTrader 5 - ページ 917

 
Artyom Trishkin:

ありがとうございました。

 
Vitaly Muzichenko:

if()構文の使用

おつかれさまでした

 
このトピックに関連しないコメントは、「MQL4 MT4 MetaTrader 4初心者からの質問」に移動しました。
 

こんばんは。

独自のシンボルを作成し、その上でEAをテストする際に、手数料を含めるオプションがあるかどうか教えてください。もしそうなら、どのように?

 
ISL:

シンボルを作成し、その上でEAをテストする場合、手数料を含めるべきでしょうか?もしそうなら、どのように?

MT5でシンボルを作成 する場合、どのメタトレーダーで作成しますか?

 
このトピックに関連しないコメントは、「MQL4 MT4 MetaTrader 4初心者からの質問」に移動しました。
 

こんにちは!以前にも質問したのですが、誰も答えてくれないので、もう少し詳しく説明します...。


//+------------------------------------------------------------------+
//|                                                         test.mq5 |
//|                        Copyright 2018, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2018, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"

class MyClass                                     1. СОЗДАЮ КЛАСС 
  {
private:

public:
                     MyClass();
                    ~MyClass();
   void              MyFunction();               2.В КЛАССЕ ОБЬЯВЛЯЮ СВОЮ ФУНКЦИЮ
  };
MyClass::MyClass()
  {
  }
MyClass::~MyClass()
  {
  }
void MyClass::MyFunction()                     
  {
  }

#property indicator_chart_window
#property indicator_buffers 1
#property indicator_plots   1
//--- plot Label1
#property indicator_label1  "Label1"
#property indicator_type1   DRAW_LINE
#property indicator_color1  clrRed
#property indicator_style1  STYLE_SOLID
#property indicator_width1  1
//--- input parameters
input int      Input1=1;
//--- indicator buffers
double         Label1Buffer[];
MyClass *PointMyClass;                            3. СОЗДАЮ УКАЗАТЕЛЬ НА СВОЙ КЛАСС          
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   SetIndexBuffer(0,Label1Buffer,INDICATOR_DATA);
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
//---
   PointMyClass.MyFunction();                         4. Здесь пытаюсь обратиться к своей функции - выдает сообщение -invalid pointer access in .. \
                                                    
                             
//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+
Помогите разобраться
 
Tango_X:

こんにちは!以前にも質問したのですが、誰も答えてくれなかったので、もう少し詳しく説明しようと思います...。

 
ISL:

自分でシンボルを作成し、その上でEAをテストする際に手数料を含めることが可能かどうか教えてください。

いいえ。

 
fxsaber:

ありがとうございました。クラスを参照することは、クラスへのポインタだとばかり思っていました。でも、ここでは単なる宣言に過ぎない...それがどうした?

理由: