fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. GSMtricks
    3. Posts
    G
    • Profile
    • Following 0
    • Followers 0
    • Topics 19
    • Posts 52
    • Best 1
    • Controversial 0
    • Groups 0

    Posts made by GSMtricks

    • RE: How to include library?

      @gsmtricks said in How to include library?:

      {"api":"online","appid":"11111"}

      Thank you for help.
      Feel stupid:
      0_1569864772068_SharedScreenshot.jpg

      posted in Questions & Answers
      G
      GSMtricks
    • RE: How to include library?

      So let me provide full information.

      1. I have variable created and named: test_json ( for example )
      2. In some time I write there JSON data: {"api":"online","appid":"11111"}

      What do I need:

      1. Read JSON string from a variable test_json ( here is data: {"api":"online","appid":"11111"} )
      2. Save to variable test_status: online
      3. Save to variable test_appid: 11111

      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,

      posted in Questions & Answers
      G
      GSMtricks
    • RE: How to include library?

      @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

      posted in Questions & Answers
      G
      GSMtricks
    • RE: How to include library?

      It's not working. Good idea but not works.
      How to test?

      1. Create new MT5 expert - just empty
      2. Export mq5 code
      3. Open exported code in MetaEditor
      4. Compile it - works
      5. Add line #include <JAson.mqh>;
      6. Compile - can't compile it. 100 errors.
      posted in Questions & Answers
      G
      GSMtricks
    • RE: How to include library?

      I know how to do it with native MQL and it works. WIth FxDremma it's not working.

      posted in Questions & Answers
      G
      GSMtricks
    • RE: Parse WebRequest response and store into Variables

      @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.

      posted in Questions & Answers
      G
      GSMtricks
    • RE: Parse WebRequest response and store into Variables

      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:

      1. Downloaded blank expert advisor in mq5 format generated by FxDremma
      2. Opened it in editor - compile - works
      3. Added same line of code: #include <JAson.mqh>
      4. Compile - a lot of error and as a result - can't compile it.
      posted in Questions & Answers
      G
      GSMtricks
    • How to include library?

      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?

      posted in Questions & Answers
      G
      GSMtricks
    • RE: Parse WebRequest response and store into Variables

      0_1569657142858_SharedScreenshot.jpg

      But this example can't compile.

      0_1569657211774_SharedScreenshot.jpg

      posted in Questions & Answers
      G
      GSMtricks
    • RE: Parse WebRequest response and store into Variables

      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

      posted in Questions & Answers
      G
      GSMtricks
    • Parse WebRequest response and store into Variables

      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.

      posted in Questions & Answers
      G
      GSMtricks
    • Select menu with conditions?

      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

      posted in Questions & Answers
      G
      GSMtricks
    • RE: How to find lowest and highest value from indicator x-candles?

      Thx for answer, i am done with loop on this 😉

      posted in Questions & Answers
      G
      GSMtricks
    • How to get normal value?

      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...

      posted in Questions & Answers
      G
      GSMtricks
    • How to find lowest and highest value from indicator x-candles?

      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_1538474608494_SIgnals.jpg
      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

      posted in Questions & Answers
      G
      GSMtricks
    • Is it possible to use CURL requests etc?

      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?

      posted in Questions & Answers
      G
      GSMtricks
    • RE: Combine variables

      @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
      0_1526543615579_Sketch.png

      posted in Questions & Answers
      G
      GSMtricks
    • RE: Draw line chart?

      https://fxdreema.com/shared/zMKRcFlTd

      I try ti start with trend lines...
      But there 2 problems:

      1. For 100 candles there a lot of blocks need to do
      2. If i am going to change timeframe - it looks broken, is there any way to make it work correctly with all timeframes?

      Waiting for help, thx.

      posted in Questions & Answers
      G
      GSMtricks
    • RE: Draw line chart?

      @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 )

      posted in Questions & Answers
      G
      GSMtricks
    • RE: Draw line chart?

      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.

      posted in Questions & Answers
      G
      GSMtricks
    • 1
    • 2
    • 3
    • 2 / 3