Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Demo_IndicatorSetDouble - MetaTrader 5 Script - MT4/MT5 Resources

author EAcpu | 5 reads | 0 comments |

Demo_IndicatorSetDouble - indicator for MetaTrader 5

Using the example IndicatorSetDouble() function. This is an indicator that inverts the maximum and minimum values ​​of the indicator window and the horizontal line values.

The indicator was created in a separate window and three horizontal lines at the 25, 50 and 75 levels were also added in the same window:

 //--- display three horizontal levels in separate indicator windows
#property indicator_level1 25
#Property Indicator Level 2 50
#Property Indicator Level 3 75

Then, place a signature in each level's OnInit() function:

 //--- Set the horizontal level description indicator set string ( INDICATOR_LEVETEXT , 0 , "First level (index 0)" );
Indicator set string ( INDICATOR_LEVETEXT , 1 , "Level 2 (index 1)" );
Indicator set string ( INDICATOR_LEVETEXT , 2 , "Third level (index 2)" );
The price changes reached are tick counters calculated during the operation of the indicator. The indicator window rendering changes every 10 ticks - the minimum value changes from 0 to -100, and the maximum value - from 100 to 0. Therefore, the indicator is "inverted".


Demo_IndicatorSetDouble - indicator for MetaTrader 5


Attachment download

📎 demo_indicatorsetdouble.mq5 (3.5 KB)

Source: MQL5 #1762

Verification code Refresh