How to use OpenLong function

 

Hi.

I am making an program to open position.

In this program, I want to use OpenLong function in CExpert.

But, this program can not compile by "cannot call protected member function" error.

Plese tell me how to correct this program.

//+------------------------------------------------------------------+
//|                                                         test.mq5 |
//|                                                      T.T   |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "T.T"
#property version   "1.00"
#include <Expert\Expert.mqh>
//+------------------------------------------------------------------+
CExpert ExtExpert;
//+------------------------------------------------------------------+
int OnInit(void)
   {
        return(INIT_SUCCEEDED);
  }

void OnDeinit(const int reason)
{
}

void OnTick()
{
double Ask = SymbolInfoDouble(Symbol(),SYMBOL_ASK);
Print(Ask);
ExtExpert.OpenLong(Ask,0,0);
}

Automated Trading and Strategy Testing
Automated Trading and Strategy Testing
  • www.mql5.com
MQL5: language of trade strategies built-in the MetaTrader 5 Trading Platform, allows writing your own trading robots, technical indicators, scripts and libraries of functions
 

https://www.mql5.com/en/forum/14482

All about MQL5 Wizard : create robots without programming.
All about MQL5 Wizard : create robots without programming.
  • www.mql5.com
What is MQL5 Wizard :The MetaTrader 5 Trading Platform includes the MQL5 Wizard, which allows to quickly generate code of an Expert Advisor (Expert Advisor builder). - - Category: general