Questions from Beginners MQL5 MT5 MetaTrader 5 - page 296

 
sheka:

RIGHT?

Not quite. Read the article.

And for MT5 I have attached the script below. See what result you get in your example.

Азбука торговли валютами - Статьи по MQL4
  • www.mql5.com
Азбука торговли валютами - Статьи по MQL4: особенности автоматических торговых стратегий
Files:
 

Hello all) Help with the problem please. I want to get the value of extremum indicator zigzag write this code.

 double Zigzag_handle=iCustom(NULL,0,"Examples\\ZigZag",20,5,3);
    Comment(Zigzag_handle);

When I ran in the tester, the value turns out to be 10, then the next bar 11, then 12 etc. I do not understand what the problem.

 
LBatters:

I'm writing an EA based on a zig zag indicator, but it won't even open a position, so I think it's because of a warning:

Here's the full EA code.

How do I get my EA to trade, please?

MqlTick last_tick;
//---
   if(SymbolInfoTick(Symbol(),last_tick))
     {
      Print(last_tick.time,": Bid = ",last_tick.bid,
            " Ask = ",last_tick.ask,"  Volume = ",last_tick.volume);
     }
   else Print("SymbolInfoTick() failed, error = ",GetLastError());
//---
TheMqlTick structurehas to be filled in first, then you can apply
 
MigVRN:

Not really. Read the article.

And for MT5 I have attached the script below. See what the result will be in your example.

Thank you, I will try to figure it out now.
 
pako:
TheMqlTick structurehas to be filled in first, then it can be applied
Thank you very much))) Now I need to figure out how to find the required value of indicator zigzag in mql5 :/
 
LBatters:
Thank you very much)))) Now I only need to figure out how to find the zigzag indicator value I need in mql5 :/

Poll the buffer, for example like this

handle=iCustom(NULL,0,"Examples\\ZigZag",12,5,3);
   ArraySetAsSeries(buf,true);
   copy=CopyBuffer(handle,0,0,100,buf);
   for(int i=0;i<100;i++)
     {
      if(buf[i]!=EMPTY_VALUE)
        {
         wert=buf[i];
         break;
        }
     }
 

Gentlemen!

I've been trying to build a bollinger robot for the second night. I figured out how to read prices from a chart, but I don't know how to build a bollinger indicator and get its values.

I found this indicator description in my manual https://www.mql5.com/ru/docs/indicators/ibands

iBands

It returns the handle of the Bollinger Bands® indicator.

Honestly, I don't understand it at all! The example below is three pages long, I got lost on the first page... Is it really necessary to bother to run such an indicator? Is it possible to read indicator values from a chart like in QuickBooks or should I first program this indicator myself?

It all looks so frightening!


Can you tell me how to interact with the indicators? How do I run bollinger and read its values?

Документация по MQL5: Технические индикаторы / iBands
Документация по MQL5: Технические индикаторы / iBands
  • www.mql5.com
Технические индикаторы / iBands - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 

And a second question right away.

I'm programming and learning the language at night and the exchange is already down. Is there any way to test my code at night, maybe there is some kind of tick generator in MT5?

 
mavar:

And a second question right away.

I'm programming and learning the language at night and the exchange is already down. Is there any way to test my code at night, maybe there is some kind of tick generator in MT5?

Use strategy tester.
 

Thanks for the tester!

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

Reason: