Questions from Beginners MQL5 MT5 MetaTrader 5 - page 297

 
mavar:

Thanks for the tester!

The question remains, how do you create and read the indicators?

https://www.mql5.com/ru/code/166

Советник "Боллинджер на стероидах"
Советник "Боллинджер на стероидах"
  • votes: 30
  • 2010.08.12
  • Andrew Kornishkin
  • www.mql5.com
Советник "Боллинджер на стероидах". Эксперт торгует по тренду и использует индикатор Bollinger Bands.
 

Good example, see these lines, here the data from Bollinger buffers 0, 1, 2 (and the buffers contain curve values) are copied into EA buffers. You seem to be new to MT5, hover over the function and press F1

if(CopyBuffer(BolBandsHandle,0,0,3,BBMidle)<0 || CopyBuffer(BolBandsHandle,1,0,3,BBUp)<0
      || CopyBuffer(BolBandsHandle,2,0,3,BBLow)<0)
 

Thank you. I've seen it.

I don't understand how to add bollinger and get its value. Couldn't figure out the code of this particular EA on my own.

 
mavar:

Thank you. I have seen it.

I don't understand how to add bollinger and get its value. Couldn't figure out the code of this particular EA on my own.

In this example the Bollinger is not added to the chart. You may not add it at all, its values are calculated without having an indicator on the chart, this is a feature of MT4/5.
 
Guys, what the hell does this function look like? Please give me a small sample code that reads the last value of the bollinger indicator.
 
mavar:
Guys, what the hell does this function look like? A small code example reading the last value of bollinger indicator, please.
What prevents you from reading the description of CopyBuffer in the help? The help is written quite clear, in Russian, so you're just too lazy to figure it out. Here are printers of values
//--- копируем новые значения индикаторов используя хэндлы
   if(CopyBuffer(BolBandsHandle,0,0,3,BBMidle)<0 || CopyBuffer(BolBandsHandle,1,0,3,BBUp)<0
      || CopyBuffer(BolBandsHandle,2,0,3,BBLow)<0)
     {
      Alert("Ошибка копирования буферов индикатора Bollinger Bands - номер ошибки:",GetLastError(),"!!");
      return;
     }
//********** это цикл надо добавить в код советника, выводит значения при наступлении нового бара
   for(int nbar=0; nbar < 3; nbar++)
     Print("nbar=", nbar, "  BBLow[nbar]=", DoubleToString(BBLow[nbar], _Digits), "  BBMidle[nbar]", DoubleToString(BBMidle[nbar], _Digits),
                    "  BBUp[nbar]=", DoubleToString(BBUp[nbar], _Digits));  
 
The last value will be for nbar == 0
 
Are there any algotrading championships? I know that there used to be an automated trading championship, but is there anything like that now?


 
LBatters:
Are there any algotrading championships? I know that there used to be an automated trading championship, but is there anything like that now?


The last championship organized by MetaQuotes was in 2012. There are no such championships now. But many brokers are still running their championships. You can take part in them.
 
<br / translate="no">

How do I see bollinger on the chart exactly in the parameters that are in the code? where are the required indicator parameters configured.


I've got bollinger running, but it's reading some wrong values.

I mean I can build a chart starting from high or low, along the exponent, etc. How can I adjust it in the code and see it on the chart to visually control the EA?

Reason: