Stock Portfolio Organizer
The ultimate porfolio management solution.
Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Balance of Power for Amibroker (AFL)
Copy & Paste Friendly
Back
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 | _SECTION_BEGIN ( "BOP " ); // Balance of Power // Example code can be found at: // http://www.traders.com/********ation...adersTips.html //----- This prevents a bad data point from generating a divide by zero. THL = IIf ( H != L , H - L , 0.01); //----- Reward ****d on Open BullOpen = ( H - O )/THL; BearOpen = ( O - L )/THL; //----- Reward ****d on Close BullClose = ( C - L )/THL; BearClose = ( H - C )/THL; //----- Reward ****d on Open - Close BullOC = IIf ( C > O , ( C - O )/THL, 0); BearOC = IIf ( O > C , ( O - C )/THL, 0); BullReward = (BullOpen + BullClose + BullOC)/3; BearReward = (BearOpen + BearClose + BearOC)/3; BOP = BullReward - BearReward; Period1 = 34; SmoothBOP = EMA (BOP, Period1); Period2 = 34; SmootherBOP = TEMA (SmoothBOP, Period2); //Plot(BOP, "BOP", colorBlack, 1); Plot (SmoothBOP, "BOP " + Period1, colorLightBlue , 1); Plot (SmootherBOP, "" , colorRed ); Plot ( Ref (SmootherBOP, -2), "" , colorBlue ); Plot (0.1, "" , colorGreen ); Plot (0, "" , colorBlack ); Plot (-0.1, "" , colorGreen ); _SECTION_END (); |