Errors, bugs, questions - page 1541

 
Karputov Vladimir:
Do you need an analogue of the right click on the chart and "Refresh" for the indicator?
Um... I don't need anything. All I said was that ChartRedraw() is not analogous to the "refresh" click.
 
how to open a demo account on the metaquotes server ??? To get new versions of mt5 ...
 
Vladimir Pastushak:
how to open a demo account on the metaquotes server ??? To get new versions of mt5 ...
choose the MetaQuotes-Demo server when you open a demo account
 
Karputov Vladimir:
Do you need an analogue of the right click on the chart and "Refresh" for the indicator?

Yes, that's right. So that the indicator can calculate, but not address the init. ChartRedraw() does not do it.

Called in OnChartEvent

 
Владимир:

Yes, that's right. So that the indicator can calculate, but not address the init. ChartRedraw() does not do it.

Called in OnChartEvent

Make the entire loop a function and call it with the required parameters from where you want.
 
Владимир:

Yes, that's right. So that the indicator can calculate, but not address the init. ChartRedraw() does not do it.

Called in OnChartEvent

For four

  static int FullOnCalculate( void )
  {
    long volume[];
    int spread[];

    ArraySetAsSeries(volume, TRUE);
    ArraySetAsSeries(spread, TRUE);

    const int Size = MathMin(CopyTickVolume(Symbol(), Period(), 0, Bars, volume),
                             CopySpread(Symbol(), Period(), 0, Bars, spread));

    return(OnCalculate(Size, 0, Time, Open, High, Low, Close, Volume, volume, spread));
  }

The same for the fifth.

 

Why does this class compile under MT4 but not under MT5?

class CHARTOBJECT
{
public:
  template <typename T>
#ifdef __MQL4__
  void SetProperty( const int id, const T Value, const int Modifier = 0 ) const
#else #endif
#ifdef __MQL5__
  void SetProperty( const ENUM_OBJECT_PROPERTY_STRING id, const T Value, const int Modifier = 0 ) const
#endif      
  {
    const string sType = typename(T);

    if (sType == "double")
      ::ObjectSetDouble(0, "", id, Modifier, (double)Value);
    else if (sType == "string")
      ::ObjectSetString(0, "", id, Modifier, (string)Value);
    else
      ::ObjectSetInteger(0, "", id, Modifier, (long)Value);

    return;
  } 
  
  virtual void operator =( const string Value ) const
  {
    this.SetProperty(OBJPROP_TEXT, Value);

    return;
  }
};
 
Is there an #else or #endif in there by any chance?
 
Комбинатор:
Is #else or #endif not unnecessary there?

In the#else #endif line, if I remove #endif, it doesn't compile. I don't know why it doesn't compile either.

But even if I remove all conditional compilation, it won't compile under MT5, but will compile under MT4.

 
Alexey Kozitsyn:
What is a multiterminal?)
It is a version of MT4 terminal, one instance of which allegedly can work with several accounts at the same time. I downloaded the installation file fcmt4multisetup_en.exe from FXCluba website. Is it their development in general and I am addressing to the wrong address?
Reason: