Monday, July 22, 2019

Cross platform iCustom

Cross-platform iCustom

Inkludnik drafted to replace iCustom on a comfortable cross-platform class.
He is of course very convenient, but may cause only displays the number of parameters is not greater than 8. This parameter, the name of the tool, tf, the buffer index is not considered.
The use is as follows:

// + ----------------------------------------------- ------------------- +
// | test.mq4 |
// + ----------------------------------------------- ------------------- +
#include iCustom.mqh

void OnStart ()
{
ICustom * x = CreateCustom ("MACD", Symbol (), Period (), 50, 100, 20);
double v1 = x.Value (1, 1);
delete x;
double v2 = iCustom (Symbol (), Period (), "MACD", 50, 100, 20, 1, 1);
print ("v1 = ", V1, "; v2 = ", V2);
}
Or so for mql5:

#include iCustom.mqh

void OnStart ()
{
ICustom * x = CreateCustom ("MACD", Symbol (), Period (), 50, 100, 20);
Sleep (200);
double v1 = x.Value (1, 1);
delete x;
int hMacd = iCustom (Symbol (), Period (), "MACD", 50, 100, 20);
Sleep (200);
double data [];
CopyBuffer (hMacd, 1, 1, 1, data);
print ("v1 = ", V1, "; v2 = ", Data [0]);
}
Especially not tested, so if bugs write.


Related posts




  • Cross Rate


    Cross Rate (cross rate). The basis of the appearance of the term was the quotation of foreign currencies to each other, after the basis of direct...




Next posts



  • Britain does not want to take

  • Daily Economic Digest from Forex

  • S P refused to lower rating of

No comments:

Post a Comment

StrikeFx

StrikeFx StrikeFx - multi martingeylovy new generation Advisor. This advisor we gave up a grid with a fixed distance between the orders. Th...