Stock Portfolio Organizer
The ultimate porfolio management solution.
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Various Functions for Amibroker (AFL)
Here some function help people create indicator faster
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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | //get the max price in any day function getMaxPriceDuration(Value,NumberOfDay){ pr = HHV ( Ref (Value,-1),NumberOfDay); return pr; }; //get the min price in any day function getMinPriceDuration(Value,NumberOfDay){ pr = LLV ( Ref (Value,-1),NumberOfDay); return pr; }; //calculate band of price function calBandPrice(percent,period){ priceMax = getMaxPriceDuration( C ,period); priceMin = getMinPriceDuration( C ,period); return priceMax < percent * priceMin; }; function ConditionCrossTwoMA(price,top,bottom){ return Cross ( MA (price,top), MA (price,bottom)); } function ConditionPriceIsAboveMA(price,period){ return price > MA (price,period); } function ConditionMACDAboveSign(){ return MACD (12,26)> Signal (12,26,9) AND ( MACD (12,26)> Ref ( MACD (12,26),-1)); } //function ConditionBBandExtend(){ //return (BBandTop(C,15,2)>BBandTop(Ref(C,-1),15,2)) AND BBandBot(C,15,2)<BBandBot(Ref(C,-1),15,2); //} function CalBollingerBanWidth(period){ MAveger = MA ( C ,period); BBtop = BBandTop ( C ,period,2); BBbottom = BBandBot ( C ,period,2); BBWidth = ((BBtop - BBbottom)/MAveger)*100; return BBWidth; } function CalBollingerB(period){ MAveger = MA ( C ,period); BBtop = BBandTop ( C ,period,2); BBbottom = BBandBot ( C ,period,2); PercentB = ( C -BBbottom)/(BBtop - BBbottom); return PercentB; } function ConditionADX(Limit){ return ADX (14)> Limit; } function isOverBought(Limit){ return RSI (14)>70; } function isOverSold(Limit){ return RSI (14)<20; } function isUpperTrend(){ return ( PDI (14) > MDI (14)) //AND (PDI(14)>Ref(PDI(14),-1)) ; } function isLowerTrend(){ return ( PDI (14) < MDI (14)) //AND (PDI(14)< Ref(PDI(14),-1)) ; } function isSuddenVolume(scale,Vol){ return V >= scale* Ref ( V ,-1) AND V >Vol ; } //find volume is bigger then a number function isVolBiggerThan(number){ return V >=number ; } function isMoneyFlowBig(index){ return MFI (14) > index; } //find the volume is bigger than anyday function isVolBiggerThanSomeDay(somedays){ return V > Sum ( Ref ( V ,-1),somedays); } |
3 comments
Leave Comment
Please login here to leave a comment.
Back
Good effort to learn the beginners
Nice Simple code
Thanks