Advertisement
saisri

main afl (support 2)

Nov 3rd, 2012
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. //MACD Indicator with colored histogram and 85% peak histogram level indication
  2. // Abnash Singh 30 October 2011
  3. // abnash1978@ * .co.uk
  4. _SECTION_BEGIN("MACD");
  5. r1 = Param( "Fast avg", 12, 2, 200, 1 );
  6. r2 = Param( "Slow avg", 26, 2, 200, 1 );
  7. r3 = Param( "Signal avg", 9, 2, 200, 1 );
  8. Plot( ml = MACD(r1, r2), StrFormat(_SECTION_NAME()+"(%g,%g)", r1, r2), ParamColor("MACD color", colorYellow), ParamStyle("MACD style") );
  9. Plot( sl = Signal(r1,r2,r3), "Signal" + _PARAM_VALUES(), ParamColor("Signal color", colorBlue ), ParamStyle("Signal style") );
  10. //Plot( ml-sl, "MACD Histogram", ParamColor("Histogram color", colorBrightGreen ), ParamStyle("Histogram style", styleHistogram | styleNoLabel, maskHistogram ) );
  11. diff=ml-sl;
  12. diffhhv=IIf(diff>0,HHV(diff,10)*.85,Null);
  13. diffllv=IIf(diff<0,LLV(diff,10)*.85,Null);
  14. Plot(diffhhv,"",colorGreen,styleNoLine|styleCandle);
  15. Plot(diffllv,"",colorRed,styleNoLine|styleDots);
  16. PlotOHLC( 0,diff , 0 ,9 , "Cloud", IIf(diff>0 ,colorBrightGreen,colorRed), styleCloud|styleNoLabel);
  17.  
  18. _SECTION_END();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement