An example of indicator on indicator
//Title = "SAR On RSI";
/////////////////Plot RSI//////////////////////
Plot( RSI(14), "RSI", colorBlue, styleThick );
P = ParamField("Price field",-1);
oldo = O; oldh = H; oldl = L; oldc = C; oldv = V;
O = H = L = C = p;
sar_flexible = SAR();
O = oldo; H = oldh; L = oldl; C = oldc; V = oldv;
/* split the plotting to green for upswing and red for downswing */
//Single Plot, 2 colours
Plot( sar_flexible, "Up SAR", IIf( sar_flexible > Ref(sar_flexible,-1),
colorGreen,colorRed ), styleDots | styleNoLine |styleThick );
//OR for 2 plots
/*
Plot( IIf( sar_flexible > Ref(sar_flexible,-1),sar_flexible,Null),
"UpSAR", colorGreen, styleDots | styleNoLine |styleThick );
Plot( IIf( sar_flexible > Ref(sar_flexible,-1),Null,sar_flexible),"Down
SAR", colorRed, styleDots | styleNoLine |styleThick );
*/
GraphXSpace = 5;
Best regards
gmorlosky a écrit :
>
>
>
> RSI of MACD code:
>
> Var=MACD();
> Up=IIf(Var>Ref(Var,-1),abs(Var-Ref(Var,-1)),0);
> Dn=IIf(Var<Ref(Var,-1),abs(Var-Ref(Var,-1)),0);
> Ut=Wilders(Up,Pds);
> Dt=Wilders(Dn,Pds);
> RSIt=100*(Ut/(Ut+Dt));
>
> --- In [email protected] <mailto:amibroker%40yahoogroups.com>,
> "bwb1940" <bwb1...@...> wrote:
> >
> > I'm having trouble creating an indicator on an indicator for ATR
> only. Looking to create the RSI of ATR. ALL OTHER DRAG AND DROPS are
> working. For instance, MA on an RSI, no problem. Have I clicked
> something ATR specific that is only allowing the indicator to point at
> price?
> >
>
>