@gsmtricks said in How to include library?:
{"api":"online","appid":"11111"}
Thank you for help.
Feel stupid:

@gsmtricks said in How to include library?:
{"api":"online","appid":"11111"}
Thank you for help.
Feel stupid:

So let me provide full information.
What do I need:
That all.
If someone can provide me working custom mql code for FxDremma I will be able to use it as an example for my strategy,
@miro1360
With your file JAson.mqh I can do include now.
Now still to understand how to adopt custom qml code.
I have a code:
// 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());
But with this code can't compile.
Please advice.
I just need to read JSON string from variable: data
It's not working. Good idea but not works.
How to test?
I know how to do it with native MQL and it works. WIth FxDremma it's not working.
@trader-philipps
Yes, sure I have it done.
You can try your self. Open any Expert generated by FxDreema and try to add line:
#include <JAson.mqh>
You will see - no way to compile it after that.
Did you copy the mqh file in the include folder of your mt4 instance?
//+------------------------------------------------------------------+
//| 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.
I did another test:
Actually https://stackoverflow.com/questions/41360826/managing-json-array-format-in-mql4-script
Here is a working example, the question is how to include an external library?

But this example can't compile.

Broker integration I do mean that I have NODE.js app which can connect to binary.com and open trades.
This local APP can send answers from broker to MT and now i can save the WEBrequest answer into a variable as a text string. But this is not useful for me, I need to get the answer parsed
Hi all,
I am trying to make a trading bot with Broker integration.
Right now have Node.js local server which gets a request from MT5 and sends requests via API to Broker.
Right now have a major problem to analyze responses.
The question is:
How i can store WebRequest response into variables?
Here is an example of a response to my request:
{"balance":5704.45,"currency":"USD","id":"548853a0-0bec-a46d-dc34-7cd3f9xxx","loginid":"VRTC15912xx"}
Looking for a way to store array separated into the variables, like:
balance=5700
currency=USD
id= etc,.
Please advice.
It there any way to predefine few payloads for conditions and just choose one of them while initializing advisor?
Default indicators from a platform have that options
Thx for answer, i am done with loop on this 
When i store some indicator value into variable ( for example Accelerator Oscilator )., and then print it i see number like:
-7E.08-05 But when i hover on Terminal - i see value like: 0.0005678
So how to get the normal value like: 0.0005678 ??? Coz i need to operate with that numbers...
Is there any way to find lowest and highest value from indicator during x-candles and get this valuse + candle ID?
For example Accelerator Oscillator i need to find lowest and highest valuse during up to 10 candles back.

0 - is candle 0
1 - the lowest value I need to find it and get the value of AO and Candle ID
2 - Highest value I need to find it and get the value of AO and Candle ID
Is it possible to use CURL requests etc?
I am trying to make a trading bot for crypt exchanges. It must work via API.
For example
https://api.hitbtc.com/#trading
curl -X GET -u "ff20f250a7b3a414781d1abe11cd8cee:fb453577d11294359058a9ae13c94713"
"https://api.hitbtc.com/api/2/trading/balance"
The above command returns JSON structured like this:
[
{
"currency": "ETH",
"available": "10.000000000",
"reserved": "0.560000000"
},
{
"currency": "BTC",
"available": "0.010205869",
"reserved": "0"
}
]
Is there ant way to do it? To send this kind of requests?
@fxdreema said in Combine variables:
In a text (string) field, when you want to use variables, add ""+ in the beginning and + "" at the end. Something like this:
"" + "Buy " + MyVariable + ""By the way I didn't made this "hack" intentionally. Long time ago I just found out that it works this way and I was doing it like that since then. But if you are not doing it that way, it could not work properly. Make sure that you have ""+ in the beginning and + "" at the end.
I tried but not works for me.
I have Variable: low_ask ( value for example inside is: BTCUSD )
I created a Draw text, and put the code inside:
"" + "Buy " + low_ask + ""
When try to compile:
'low_ask' - undeclared identifier
I wanted to get:
Buy BTCUSD
But still not lucky on this.
After some test i have more info, if
"" + MyVariabe + ""
is my CONSTANT - than it works, but it's not a constant - it is variable

https://fxdreema.com/shared/zMKRcFlTd
I try ti start with trend lines...
But there 2 problems:
Waiting for help, thx.
@drayzen said in Draw line chart?:
Hi @gsmtricks ,
Would Trace do what you're after?
https://fxdreema.com/examples#Tips-and Tricks
It's very close to trace, just there is no history. For me is good to make a lines between candles, for example latest 100 candles ( close param )
I mean candle has last price, so i am just need to draw lines ( history also )
between candles, similar to line chart or even same.
My idea is to put few assests on one chart.