help needed for this (amibroker) formula

#1
Dear All,
please help me to add arows (buy, sell) to this formula. for example,
when the ROCadj crosses the ROC its a buy sign and visa versa. thank you

_SECTION_BEGIN("ROCadj");
periods = Param("Periods", 21, 2, 200, 1 );
ROCadj = periods * EMA( ROC( C, 1 ), periods );
Plot( ROCadj, "ROCadj "+periods, colorRed, styleThick );
// the line below adds standard ROC overlay
Plot( ROC( C, periods ), "ROC "+periods, colorBrightGreen );
 

rmike

Well-Known Member
#2
Dear All,
please help me to add arows (buy, sell) to this formula. for example,
when the ROCadj crosses the ROC its a buy sign and visa versa. thank you

_SECTION_BEGIN("ROCadj");
periods = Param("Periods", 21, 2, 200, 1 );
ROCadj = periods * EMA( ROC( C, 1 ), periods );
Plot( ROCadj, "ROCadj "+periods, colorRed, styleThick );
// the line below adds standard ROC overlay
Plot( ROC( C, periods ), "ROC "+periods, colorBrightGreen );
Dear abdul,

_SECTION_BEGIN("ROCadj");
periods = Param("Periods", 21, 2, 200, 1 );
ROCadj = periods * EMA( ROC( C, 1 ), periods );
Plot( ROCadj, "ROCadj "+periods, colorRed, styleThick );
// the line below adds standard ROC overlay
Plot( ROC( C, periods ), "ROC "+periods, colorBrightGreen );
Buy=cross(ROCadj, ROC(C, periods));
Sell=cross(ROC(C, periods), ROCadj);
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) );
_SECTION_END();

P.S - Do take the effort of reading the ami help files sometimes. :)

Regards,
 
Last edited:

Similar threads