Download MetaTrader 5

indicator handle?

To add comments, please log in or register
Have you developed a trading robot? Publish it in the Market and make profit!
sentinelx
44
sentinelx 2012.07.24 10:49 

Hello all,

My question may be a very simple one but i just want to clear my mind about it. 

What exactly is an indicator handle. My best guess is that it is a variable which stores the value of an indicator. Am i right?

Thanks in advance. 

Amir Yacoby
1192
Amir Yacoby 2012.07.24 11:35  

just an internal identification for MQL5 for the indicator that you create.

As an internal identification, it's a black box for you, but there are MQL5 commands that get this handle from you and know to which indicator you are reffering (what TF, Period, Parameters etc, as you created it). 

okwh
1631
okwh 2012.07.25 09:26  

just like a alias name,  you can use it to access the indicator's contents.

Amir Yacoby
1192
Amir Yacoby 2012.07.25 13:59  
amir_avatar:

just an internal identification for MQL5 for the indicator that you create.

As an internal identification, it's a black box for you, but there are MQL5 commands that get this handle from you and know to which indicator you are reffering (what TF, Period, Parameters etc, as you created it). 

In other words, if you want to know what happens (probably, this is very logic assumption):

when you create an indicator with your own private attibutes, MQL5 opens an area in memory keeping these attributes. In the time of creation, it assigns an internal id for this area, it hands the id to you and keeps it for itself in case you are going to come back and reffer to it (:

That's all there is to it, it can be a number, an alpha etc.. As long as it is unique per session. 

Dimka-novitsek
2421
Dimka-novitsek 2012.09.19 22:25  
Good evening! Indicator handle creating it in OnInit. Sorry, but that makes indicator handle repaint with the arrival of new ticks or even bars if it is created in the init? True, I just want to understand. Somehow unreal obtained by writing to the init!
True to this?
Is not it better to be in on tick inscribe?
To add comments, please log in or register