I want to display, ticked up or ticked down in the title of the indicator, What function can i use?
_SECTION_BEGIN("MACD");
r1 = Param( "Fast avg", 12, 2, 200, 1 );
r2 = Param( "Slow avg", 26, 2, 200, 1 );
r3 = Param( "Signal avg", 9, 2, 200, 1 );
//Latest bar
ml = MACD(r1, r2);
sl = Signal(r1,r2,r3);
MACD_H= ml-sl;
slope = "";
if (MACD_H > Ref(MACD_H, -1){
slope = "Ticked UP"
else
slope = "Ticked Down"
}
Plot( ml, StrFormat(_SECTION_NAME()+"(%g,%g)", r1, r2), ParamColor("MACD color", colorRed ), ParamStyle("MACD style") );
Plot( sl, "Signal" + _PARAM_VALUES(), ParamColor("Signal color", colorBlue ), ParamStyle("Signal style") );
Plot( MACD_H, "MACD Histogram", ParamColor("Histogram color", colorDefault ), ParamStyle("Histogram style", styleHistogram | styleNoLabel, maskHistogram ) );
Plot(
_SECTION_END();