Page 1 of 1

Using an index system on another stock

Posted: Fri Jul 22, 2016 5:33 pm
by henry1224
This is a system that shows when an index is above it's moving average and how it affects another stock

You first have to have the $SPX or the index symbol in the same stock list as the stock you are tracking

under the parameters tab

Sym Symbol $SPX 0 0

pds Double 15 2 200


here is the code


SCl:=Fml(Sym,'C');
x:=MA(SCl,pds);

Entry:If(SCl>=x,1,0),ColorGreen;
Exit:If(SCl<x,-1,0),ColorRed;
FillRgn(Entry == 1,1,0),Brush#70008000;
FillRgn(Exit == -1,0,-1),Brush#70800000;