Stock Portfolio Organizer
The ultimate porfolio management solution.
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Positive Percentage Indicator for Amibroker (AFL)
This formula shows you the positive bar percentage of the script.
it calculates past bar data & average it with a percentage value.
you can combine this with your other indicators to get a Popper momentum idea.
like when you going to Long with your current indicators, do taste how much positivity there is on different time frames for that particular script.
Indicator / Formula
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | _SECTION_BEGIN ( "Positive Bars Percentage" ); BarsUp=0; BarsDown=0; PCount = 0; NCount = 0; NewDay = Day () != Ref ( Day (), -1); for (i=0;i< BarCount ;i++) { if (NewDay[i]== True ) { BarsUp[i]=0; BarsDown[i]=0; PCount = 0; NCount = 0; } //positive count if ( C [i]- O [i]>0) { PCount++; BarsUp[i]=PCount; BarsDown[i]=NCount; } //negative count if ( C [i]- O [i]<0) { NCount++; BarsUp[i]=PCount; BarsDown[i]=NCount; } } BarsToday = 1 + BarsSince (NewDay); PositiveBarsPercentage = BarsUp*100/BarsToday; //Plot(BarsToday,"Today Bars",colorRed); //Plot(BarsUp,"Positive Bars",colorblue); //Plot(BarsDown,"Negative Bars",colorRed); Plot (PositiveBarsPercentage, "PositiveBars Percentage" , colorGreen ); _SECTION_END (); |
0 comments
Leave Comment
Please login here to leave a comment.
Back