Do u have this AFL - Stone Moulder?

mastermind007

Well-Known Member
#11
What does this afl do?
In one line? It is one brave ant's attempt to steer a Boeing!!!!

No offense meant to the author but just from the image shown here, the guy has attempted to create metaphor of Road and so he is attempting to visualize movement of scrip as a drive through a straight road.

Given that since past 3 years I have been forcing myself to learn all jags and zigs of market, this guy using straight line to do the same is refreshing, disconcerting great and brave attempt all at the same time.

In short, it is like an Ant attempting ....
 

mastermind007

Well-Known Member
#12
Trend Score AFL very short and can be moved very easily on screen.

Code:
_SECTION_BEGIN("Trendscore.aflet");
HaClose = EMA((O+H+L+C)/4,3); 
HaOpen=IIf(BarIndex()>0,AMA(Ref(HaClose,-1),0.5),Open);
HaHigh=Max(H,Max(HaClose,HaOpen));
HaLow=Min(L,Min(HaClose,HaOpen));

p1=Param("Extreme period1",5,3,10);
p2=Param("Extreme period2",8,3,20);
p3=Param("Extreme period3",13,3,50);

HaDiff=IIf(HaClose>HaOpen,1,IIf(HaClose<HaOpen,-1,0));
HaDiff1=IIf(HaClose>EMA(HaClose,p1),1,IIf(HaClose<EMA(HaClose,p1),-1,0));
HaDiff2=IIf(HaClose>EMA(HaClose,p2),1,IIf(HaClose<EMA(HaClose,p2),-1,0));
HaDiff3=IIf(HaClose>EMA(HaClose,p3),1,IIf(HaClose<EMA(HaClose,p3),-1,0));
HaDiff4=IIf(EMA(HaClose,p1)>EMA(HaClose,p2),1,IIf(EMA(HaClose,p1)<EMA(HaClose,p2),-1,0));
HaDiff5=IIf(EMA(HaClose,p2)>EMA(HaClose,p3),1,IIf(EMA(HaClose,p2)<EMA(HaClose,p3),-1,0));
HaDiff6=IIf(HaClose>Ref(HaClose,-1),1,IIf(HaClose<Ref(HaClose,-1),-1,0));

tsc=HaDiff+HaDiff1+HaDiff2+HaDiff3+HaDiff4+HaDiff5+HaDiff6;

function plottscColumn(cc,X1,Y1,distance,ht,wt,tsc)
{xPos=X1;endYPos=Y1+wt;
for(i=cc;i>0;i--){
color=IIf(tsc>i-1,ColorRGB(0,100+i*20,0),IIf(tsc<-1*(i-1),
IIf(i>3,ColorRGB(255,(20*i)-60,0),ColorRGB(195+(i*20),0,0)),GetChartBkColor()));
GfxSelectSolidBrush(color);
GfxRoundRect(Y1,xPos,endYPos,xPos-ht,3,3);
xPos+=distance;}}
GfxSelectPen(ColorRGB(180,180,180),1,0);
tp=Status("pxchartheight")-Param("Vertical Position",272,70,500,1);
rp=Param("Horizontal Position",49,48,800,1);
sp=12;
ht=wt=10;
plottscColumn(7,tp,rp,sp,ht,wt,SelectedValue(tsc));
rp-=sp;
plottscColumn(7,tp,rp,sp,ht,wt,SelectedValue(Ref(tsc,-1)));
rp-=sp;
plottscColumn(7,tp,rp,sp,ht,wt,SelectedValue(Ref(tsc,-2)));
rp-=sp;
plottscColumn(7,tp,rp,sp,ht,wt,SelectedValue(Ref(tsc,-3)));
rp-=sp;
plottscColumn(7,tp,rp,sp,ht,wt,SelectedValue(Ref(tsc,-4)));
_SECTION_END();
BEST WAY TO USE
Save the file in "C:\Program Files\Amibroker\Formulas\Custom\TrendScore MM07.afl"

Then in the AFL that you want to include it, edit it and simply add following one line somewhere. I usually add it at the end.
#include "C:\Program Files\Amibroker\Formulas\Custom\TrendScore MM07.afl"

SECOND BEST WAY TO USE
Right Click on the AFL's name in Chart Window and then Click Overlay.
 
Last edited:

mastermind007

Well-Known Member
#15
Hi Mastermind
But this AFL gives no addition to the price chart.
Or I am missing something.
Can you post a chart using this AFL
BEST WAY TO USE
Save the file in "C:\Program Files\Amibroker\Formulas\Custom\TrendScore MM07.afl"

Then in the AFL that you want to include it, edit it and simply add following one line somewhere. I usually add it at the end.
#include "C:\Program Files\Amibroker\Formulas\Custom\TrendScore MM07.afl"

SECOND BEST WAY TO USE
Right Click on the AFL's name in Chart Window and then Click Overlay.
 

mastermind007

Well-Known Member
#16
hi
here is a chart

1 superimpose price with styleownscale
and add
2 plot (tsc,"tsc",colorred,8+16);

see L&T 1 MINUTE CHART
Shows support resz at 960 and 981
cheers
fordK and others !!

No, it is not meant to be plotted that way. Sorry for not providing instructions before. Trend Score is a very compact indicator which shows 5 days trend computed using using Heiken Ashi in a grid of 5 x 7. It will not occupy more than 75 x 50 pixels space on screen. Here is full size image of Indicator on screen.



Colors have usual meaning. Green is uppity up. Red is Down. White is unknown. As you move across candles, colors will change.

Shruti had posted this somewhere some time ago but that code was over 150 lines and it was pinned to bottom right of screen. This is functional equivalent in under 50 lines and can be moved anywhere on screen.

@ford: it will be appreciated if you delete your post #14, it will avoid confusion.
 
Last edited:
#18
Why to click again n again...


Tscore on Candles :clap:

Code:
_SECTION_BEGIN("TScore Price Color");
//*********************************************************
   //http://forexsection.blogspot.com/ 
   //writted by Emmen              
   //Trend Score Price Color
//*********************************************************

HaClose =EMA((O+H+L+C)/4,3);  // Woodie 
HaOpen = IIf(BarIndex()>0,AMA( Ref( HaClose, -1 ), 0.5 ),Open);
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) ); 

p1=Param("Extreme period1",5,3,10);
p2=Param("Extreme period2",8,3,20);
p3=Param("Extreme period3",13,3,50);
sc=Param("Score Limit",3,1,7);

HaDiff = IIf(HaClose>HaOpen, 1, IIf((O+H+L+C)/4<HaOpen,-1,0));
HaDiff1 = IIf(HaClose>EMA(HaClose,p1), 1, IIf(HaClose<EMA(HaClose,p1),-1,0));
HaDiff2 = IIf(HaClose>EMA(HaClose,p2), 1, IIf(HaClose<EMA(HaClose,p2),-1,0));
HaDiff3 = IIf(HaClose>EMA(HaClose,p3), 1, IIf(HaClose<EMA(HaClose,p3),-1,0));
HaDiff4 = IIf(EMA(HaClose,p1)>EMA(HaClose,p2), 1, IIf(EMA(HaClose,p1)<EMA(HaClose,p2),-1,0));
HaDiff5 = IIf(EMA(HaClose,p2)>EMA(HaClose,p3), 1, IIf(EMA(HaClose,p2)<EMA(HaClose,p3),-1,0));
HaDiff6 = IIf(HaClose>Ref(HaClose,-1), 1, IIf(HaClose<Ref(HaClose,-1),-1,0));

TScore = HaDiff + HaDiff1 + HaDiff2 + HaDiff3 + HaDiff4 + HaDiff5 + HaDiff6;

FillColor = IIf(TScore>sc AND NOT (Ref(TScore,-1)<sc AND Avg<Ref(Avg,-1)),colorDarkGreen,
        IIf(TScore<-sc AND NOT (Ref(TScore,-1)>-sc AND Avg>Ref(Avg,-1)),ColorRGB(100,0,0),colorWhite));
mycolor=IIf(Tscore>0, colorLime,colorRed);

SetBarFillColor(Fillcolor);

PlotOHLC(O,H,L,C,"Candlestick",myColor,styleCandle|styleLine);
_SECTION_END();



Link for the code -

http://wisestocktrader.com/indicators/3290-trend-score-price-color


Enjoy :clapping:



Happy n safe trading
 

mastermind007

Well-Known Member
#19

Similar threads