Errors, bugs, questions - page 603

 
goblin:
Is this picture on MT4 or MT5?
Of course on MT5.
 

sergeev: 

Re: it's blank.

The MQL4 articles include "Practical application of cluster indicators in the FOREX market - Articles on MQL4" and "Theoretical basis of building cluster indicators for the FOREX market - Articles on MQL4".

Somewhere I have downloaded this branch. But with the change of iron - to find a problem, so I can't promise anything.

If memory serves me right, everything constructive is in the articles. The question is whether it is possible to get x's and y's from a robot.

Question: is it possible to get a CCFp_2 handle? How (bit of code)?
 
goblin:
question: is it possible to get a CCFp_2 handle?How (bit of code)?

???

ZS decipher what it means?

 
goblin:
question: is it possible to get a CCFp_2 handle?
of course, it is a normal indicator.
 
sergeev:
Of course, it's an ordinary indicator.

is not quite usual : i Custom( The symbolic name of the instrument whose data will be used to calculate the indicator,...) and we have a multi-currency indicator.

 
Urain:

???

ZS decipher what it means?

no problem: write

//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
      int m_handle=iMA("GBPUSD",PERIOD_CURRENT,3,0,MODE_SMA,PRICE_MEDIAN);
   Print("m_handle  ",m_handle);
   m_handle=iMA("USDCHF",PERIOD_CURRENT,3,0,MODE_SMA,PRICE_MEDIAN);
   Print("m_handle  ",m_handle);
  }
 
goblin:

no problem: write

hndl=iCustom(_Symbol,_Period,"Имя индикатора",параметр1,параметр2,...и т.д.);
// параметры указываются только те и столько, сколько их имеется в вызываемом индикаторе

The symbol and period don't have to be equal to the chart, you can from other timeframes and symbols.

I was just surprised by this question (that's why I don't understand it), it's in iCustom() description

PS The data of the calculated indicator is obtained through the function CopyBuffer(), you need to specify the handle and number of the buffer to be obtained (the description is in the manual).

PPS iCustom starts indicator calculation flow, CopyBuffer receives indicator data.

 
goblin:

is not quite usual : i Custom( The symbolic name of the instrument whose data will be used to calculate the indicator,...) and we have a multi-currency.

so what?

is it your obligation to apply this indicator to a certain currency?

I don't know why you bother - go and check it.

Personally, everything works for me. I call it from an Expert Advisor and even throw it on a chart.

 
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_plots   1

ENUM_TIMEFRAMES arr[1]={PERIOD_M15};

int OnInit()
  {
   return(0);
  }

int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
   ArraySetAsSeries(high,true);
   ArraySetAsSeries(low,true);
   ArraySetAsSeries(time,true);

   string n;

   StringConcatenate(n, "Fibo ",
//   StringConcatenate(n, "Some string ",
                    time[70], " - ",
                    time[50], " ",
                    EnumToString(arr[0]));

   Print(n);

   ObjectCreate(0,n,OBJ_FIBO,0,time[70],high[70],time[50],low[50]);

   return(rates_total);
  }

This way the object is drawn as it should be and signed with the given compound name without any problems. If you remove the first StringConcatenate() and uncomment the second, the object is drawn incomplete and when viewing its properties, the string name appears cropped:

Some string 2011.12.01 04:00:00 - 2011.12.06 12:00:00 PERIOD_M1

(should be: Some string 2011.12.01 04:00:00 - 2011.12.06 12:00:00 PERIOD_M15),

though Print() always outputs the correct resulting string.

What is humor?

 
x100intraday:

(should be: Some string 2011.12.01 04:00:00 - 2011.12.06 12:00:00 PERIOD_M15),

though Print() always outputs the correct resulting string.

The length of the object name is limited.
Reason: