Schau, wie man Roboter kostenlos herunterladen kann
Finden Sie uns auf Facebook!
und werden Sie Mitglied unserer Fangruppe
Interessantes Skript?
Veröffentliche einen Link auf das Skript, damit die anderen ihn auch nutzen können
Hat Ihnen das Skript gefallen?
Bewerten Sie es im Terminal MetaTrader 5
Bibliotheken

Http Client - Bibliothek für den MetaTrader 4

Ansichten:
673
Rating:
(18)
Veröffentlicht:
2016.03.30 14:59
http51-noRT.zip (26.61 KB)
http51.zip (5.01 KB)
Benötigen Sie einen Roboter oder Indikator, der auf diesem Code basiert? Bestellen Sie ihn im Freelance-Bereich Zum Freelance

http51.mqh

#import "http51.dll"

string httpGET    (string URL, int  status []);
string httpDELETE (string URL, int  status []);
string httpPUT    (string URL, string RequestBody, int  status []);
string httpPOST   (string URL, string RequestBody, int  status []);
string httpTRACE  (string URL, string RequestBody, int  status []);

string URLEncode(string toCode) {...}
string ArrayEncode(string &array[][]) {...}
void   addParam(string key, string val, string&array[][]) {...}
string hex(int i) {...}

sample_http51.mq4

#property copyright "JavaDev"
#property link      "mailto:javadev@rambler.ru"

#include <http51.mqh>

int start()
  {
  
   string params [0,2];
   //params[?,0] = Key
   //params[?,1] = Value

   ArrayResize( params, 0); // Flush old data
   int status[1];           // HTTP Status code
  
   // Setzen der Parameter addParam(Key,Value,paramArray)
   addParam("Bid",Bid,params);
   addParam("Ask",Ask,params);
   // TODO .... alle weiteren Parameter

   //erzeugung eines URLEncoded strings aus dem Parameterarray
   string req = ArrayEncode(params);

   //Senden der Anfrage 
   //string res = httpGET("http://127.0.0.1/test?"+ req, status);
   string res = httpPOST("http://127.0.0.1/test", req, status);
   
   Print("HTTP:",status[0]," ", res);
    
   return(0);
  }
//+------------------------------------------------------------------+

http51.dll req MSVCR71.dll (Runtime Library) in system path or use dll from http51-noRT.zip

Übersetzt aus dem Russischen von MetaQuotes Ltd.
Originalpublikation: https://www.mql5.com/ru/code/8435

Trend Indicators Trend Indicators

Eine kleine Ansammlung von Indikatoren.

Variations on the Topic of WPR Variations on the Topic of WPR

Eine kleine Ansammlung von Indikatoren.

Ein Regressions-Kanal auf Basis von Hoch- und Tief-Kursen Ein Regressions-Kanal auf Basis von Hoch- und Tief-Kursen

Dieser Indikator zeichnet einen Regressions-Kanal, der auf Hoch und Tief-Kursen basiert.

Forecasting of Price Ranges Forecasting of Price Ranges

Der Indikator zeigt die Preisspanne der nächsten Bar.