Print Returned Values Of EX4 Indicator In OnTick

 

I have an ex4 indicator that I downloaded, I would like to create notifications for this indicator when I have a signal (Up or Down).

On Data Window I noticed that it has 4 Parameters and these only show values when mouse is hovered on a specific point of the indicator in the bottom Window.
Some of these values return nothing while some will return the price at that specific point of the mouse hover.

I will use it in such a way that if eg: UpSignal returns 0 then do nothing, if UpSignal returns price then do something like Alert(); (The coding part of the EA I can handle myself, I just need help with getting the return values of these parameters from the ex4 indicator)


I tried printing the buffers but they are are giving me different/unknown values: (not values from highlighted up and down signal arrows), or are those values only returned at that point in time only when they happen?


Print("Buffer 0: ",iCustom(Symbol(),PERIOD_CURRENT,"TrendFinderIndicator",0,0));
Print("Buffer 1: ",iCustom(Symbol(),PERIOD_CURRENT,"TrendFinderIndicator",1,0));
Print("Buffer 2: ",iCustom(Symbol(),PERIOD_CURRENT,"TrendFinderIndicator",2,0));
Print("Buffer 3: ",iCustom(Symbol(),PERIOD_CURRENT,"TrendFinderIndicator",3,0));
Print("Buffer 4: ",iCustom(Symbol(),PERIOD_CURRENT,"TrendFinderIndicator",4,0));
Print("Buffer 5: ",iCustom(Symbol(),PERIOD_CURRENT,"TrendFinderIndicator",5,0));
Print("Buffer 6: ",iCustom(Symbol(),PERIOD_CURRENT,"TrendFinderIndicator",6,0));
Print("Buffer 7: ",iCustom(Symbol(),PERIOD_CURRENT,"TrendFinderIndicator",7,0));

Refer to image attached from Indicator window 1 (values.jpg): I would like to use iCustom to get the values of UpSignal, DnSignal, UpTrend and DnTrend.

Documentation on MQL5: Technical Indicators / iCustom
Documentation on MQL5: Technical Indicators / iCustom
  • www.mql5.com
[in]  The name of the custom indicator, with path relative to the root directory of indicators (MQL5/Indicators/). If an indicator is located in a subdirectory, for example, in MQL5/Indicators/ [in] input-parameters of a custom indicator, separated by commas. Type and order of parameters must match. If there is no parameters specified, then...
Files:
values.jpg  23 kb
 
  1. twostarii: n Data Window I noticed that it has 4 Parameters 
    Those are not parameters (indicator properties,) those are buffer values.

  2. twostarii: if eg: UpSignal returns 0 then do nothing

    The data window shows blank; that means that buffer has an empty value. The default is EMPTY_VALUE not zero. Verify the real value.

  3. twostarii: or are those values only returned at that point in time only when they happen?
    Your code is reading buffers on the forming bar (zero.) Generally only look at the completed bar, once at the start of a new bar.
Reason: