Did you copy the mqh file in the include folder of your mt4 instance?
- Yes, also just for test i have create some example:
//+------------------------------------------------------------------+
//| Test1.mq5 |
//| Copyright 2019, MetaQuotes Software Corp. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2019, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
//--- input parameters
#include <JAson.mqh>
input string data="dd";
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//--- create timer
EventSetTimer(5);
//---
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
//--- destroy timer
EventKillTimer();
}
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
//---
}
//+------------------------------------------------------------------+
//| Timer function |
//+------------------------------------------------------------------+
void OnTimer()
{
// Object
CJAVal json;
// Load in and deserialize the data
json.Deserialize(data);
// Try to access the data elements
Alert(json["orderid"].ToInt());
Alert(json["ordercurrency"].ToStr());
}
//+------------------------------------------------------------------+
I can compile it and it works.
Additionally set project properties to.point to your mt instance.
- what do you mean? As I can see error comes from FxDremma.
I did another test:
- Downloaded blank expert advisor in mq5 format generated by FxDremma
- Opened it in editor - compile - works
- Added same line of code: #include <JAson.mqh>
- Compile - a lot of error and as a result - can't compile it.