PureBytes Links
Trading Reference Links
|
Thank you for all those that responded, Here is a sample code using the
buy and sell spikes, I offset my buy and sell spikes for a faster
reference , also the flat between the spikes informs of current trend ,
take a look at the image file.
How about the chart image, sort of a chart wave.
Thank you
Anthony
// Moving average crossover
// with buy and sell alert spikes
// and Chart wave.
// coded by Anthony Faragasso
MaxGraph=15;
Price=C; // Price variable ( open,high,low,close )
pds1=6; // Short term moving average
pds2=20; // Mid term moving average
pds3=45; // Long term moving average
MA1=EMA(price,pds1);
MA2=EMA(price,pds2);
MA3=EMA(price,pds3);
B1=Cross(MA1,MA3); //( bullish Crossover )
S1=Cross(MA3,MA1); //( bearish crossover )
Buy=b1;
Sell=s1;
barcolor=IIf(Buy,5,IIf(Sell,4,0));
Graph0=b1*.8; //buy spike offset
Graph1=s1*-.8; //sell spike offset
Graph0BarColor=Graph1BarColor=ValueWhen(barcolor!=0, barcolor );
Graph0Style=Graph1Style=2+4;
Graph2=C;
Graph2Style=1+4;
Graph3=MA1;
Graph4=MA2;
Graph5=MA3;
Graph3Style=Graph4Style=Graph5Style=1+64;
Graph3Color=5;
Graph4Color=4;
Graph5Color=6;
Graph6=MA1;
Graph7=MA2;
Graph8=MA3;
Graph6Style=Graph7Style=Graph8Style=4+1;
Attachment:
Description: ""
|