Questions from a "dummy" - page 157

 
I think the problem is with the ChartID.Does the CHART object have one of its own.And how to get it then.
 

In the examples with CopyBuffer(...) it's written that the array indexing order should be set as in MQL4 usingArraySetAsSeries(..., true) . Could you tell me, is it necessary to perform the same array indexing for CopyHigh(...), CopyLow(...) and the like?

 
progma137:
does not draw:(
Because it's not clear what you're doing in the code at all.
 
Karlson:
I think the problem is with the ChartID.Does the CHART object have one of its own.And how to get it then.
via ObjectGetInteger
 
Paladin80:

In the examples with CopyBuffer(...) it's written that the array indexing order should be set as in MQL4 usingArraySetAsSeries(..., true) . Could you tell me, is it necessary to perform the same array indexing for CopyHigh(...), CopyLow(...) and the like?

As far as I remember, yes. If memory serves me correctly I did it once at initialization.
 
sergeev:
via ObjectGetInteger

Thank you. It didn't come out last night.

Got it. Based on the documentation code.

void OnStart()
{     string no = "NewChart";

      ObjectCreate(0, no, OBJ_CHART,0,0,0);
      ObjectSetInteger(0, no, OBJPROP_CORNER, 0);
      ObjectSetInteger(0, no, OBJPROP_XDISTANCE, 0);
      ObjectSetInteger(0, no, OBJPROP_YDISTANCE, 0);
      ObjectSetInteger(0, no, OBJPROP_XSIZE, 500);
      ObjectSetInteger(0, no, OBJPROP_YSIZE, 200);
      ObjectSetInteger(0, no, OBJPROP_PERIOD, PERIOD_H8);
      ObjectSetString(0, no, OBJPROP_SYMBOL, "GBPUSD");
      
  //--- переменные для идентификаторов графиков
   long currChart,prevChart=ChartFirst();
   int i=0,limit=100;
   Print("ChartFirst = ",ChartSymbol(prevChart)," ID = ",prevChart);
   while(i<limit)// у нас наверняка не больше 100 открытых графиков
     {
      currChart=ChartNext(prevChart); // на основании предыдущего получим новый график
      if(currChart<0) break;          // достигли конца списка графиков
      Print(i,ChartSymbol(currChart)," ID =",currChart);
      prevChart=currChart;// запомним идентификатор текущего графика для ChartNext()
      i++;// не забудем увеличить счетчик
     }
     Print(prevChart);
     
   int handle_ind_h8 =iMACD(ChartSymbol(prevChart),ChartPeriod(prevChart),12,26,9,PRICE_CLOSE);
   Print("Хендл=",handle_ind_h8);
   bool f1 = ChartIndicatorAdd(prevChart,1, handle_ind_h8);
   Print("Добавили?=",f1);
   Print(GetLastError());ResetLastError();
}
 

What is meant by trades in the tester report (% of winners)? Are these trades or orders? When calculating the profitability factor, are trades or orders used?

 
gpwr:

What is meant by trades in the tester report (% of winners)? Are these trades or orders? When calculating the profitability factor, are trades or orders used?

Oh, eh! Long time hesitate to ask. Also when calculating MAE, MFE, etc.

 
Try pressing F1.

Shouldn't our documentation department send unrealistic praise?
 
Renat:
Try pressing F1.

Shouldn't our documentation department send an unrealistic message of respect?
Thank you. F1 gave me the information I needed. I send my respect to your department.
Reason: