Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Indicator | Color Parabolic 2

Added colors to Parabolic SAR. The color depends on the acceleration factor.

All calculations performed inside the CParabolic class.

The functions:

  • Init(double SARStep, double SARMaximum,const double &high[],const double &low[],int totl) - initialization.
  • GetColor() - gets the color.
  • Calc(const double &high[],const double &low[],int i) - calculates the value of Parabolic at the specified bar.

The code will be useful for all who start to learn classes.

The colors are listed in the line:

#property indicator_color1  Blue,Purple,Indigo,Sienna,SteelBlue,Aqua,SpringGreen,Gold,Yellow,Linen,MintCream

This version uses 10 first colors, but it's better to specify more colors in the list.

MetaTrader Experts, Indicators, Scripts and Libraries

96

Best MetaTrader Indicators + Profitable Expert Advisors