Advertisement
saisri

at a time 3 price candle change

Jul 15th, 2012
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.23 KB | None | 0 0
  1. _SECTION_BEGIN("Chart Settings");
  2. SetChartOptions(0,chartShowArrows|chartShowDates);
  3. SetChartBkColor(ParamColor("Outer Panel",colorPaleBlue));
  4. SetChartBkGradientFill(ParamColor("Upper Chart",colorDarkGrey),ParamColor("Lower Chart",colorDarkGrey));
  5. GraphXSpace=Param("GraphXSpace",10,0,100,1);
  6. dec = (Param("Decimals",2,0,7,1)/10)+1;
  7. bi = BarIndex();
  8. Lbi = LastValue(BarIndex());
  9. sbi = SelectedValue(bi);
  10. x1= BarCount-1;
  11. Title = EncodeColor(55)+ Title = Name() + " " + EncodeColor(32) + Date() +
  12. " " + EncodeColor(5) + "{{INTERVAL}} " +
  13. EncodeColor(55)+ " Open = "+ EncodeColor(52)+ WriteVal(O,dec) +
  14. EncodeColor(55)+ " High = "+ EncodeColor(5) + WriteVal(H,dec) +
  15. EncodeColor(55)+ " Low = "+ EncodeColor(32)+ WriteVal(L,dec) +
  16. EncodeColor(55)+ " Close = "+ EncodeColor(52)+ WriteVal(C,dec)+
  17. EncodeColor(55)+ " Volume = "+ EncodeColor(52)+ WriteVal(V,1);
  18.  
  19.  
  20. SetChartOptions(2,chartShowArrows|chartShowDates|chartWrapTitle);
  21. SetChartOptions(0,chartShowArrows|chartShowDates);
  22.  
  23.  
  24. //GfxGradientRect( 180, 30, 1759, 735, ColorRGB(40,40,40), ColorRGB(0,0,40) );
  25. GfxSetOverlayMode(1);
  26. //GfxSelectPen( ColorRGB(150,0,0), 1 );
  27. GfxSelectSolidBrush( ColorRGB(0,0,40) );
  28. //GfxRectangle=( 0,750, 1807, 35 );
  29.  
  30. //GfxSelectPen( ColorRGB(150,0,0), 2 );
  31. GfxSelectSolidBrush( ColorRGB(65,65,65) );
  32. //GfxPolygon(250,200,200,250,250,20,200,50);
  33.  
  34. //GfxSelectPen( ColorRGB(125,0,0), 1 );
  35. //GfxSelectSolidBrush( ColorRGB(0,0,40) );
  36. //GfxRectangle( 10,100, 190, 160 );
  37.  
  38. //GfxSelectPen=( ColorRGB(0,0,0) ,1 );
  39. GfxSelectSolidBrush( ColorRGB(0,0,0) );
  40. //GfxSetTextAlign( 250 );// center alignment
  41.  
  42. GfxSetOverlayMode(1);
  43. //GfxSelectFont=("Times New Roman", 30, 400, True );
  44. GfxSetTextColor( ColorRGB( 105, 105, 105 ) );
  45. GfxSetBkMode(0); // transparent
  46. //GfxTextOut=("Pathfinder", 15 , 35 );
  47.  
  48. _SECTION_END();
  49. _SECTION_BEGIN("Flower");
  50. si=Param("Zoom/In Out",5,-50,100,1);
  51. GraphXSpace=si;
  52.  
  53. r1 = Param( "ColorFast avg", 5, 2, 200, 1 );
  54. r2 = Param( "ColorSlow avg", 10, 2, 200, 1 );
  55. r3 = Param( "ColorSignal avg", 5, 2, 200, 1 );
  56.  
  57. m1=MACD(r1,r2);
  58. s1=Signal(r1,r2,r3);
  59. mycolor=IIf(m1<0 AND m1>s1, ColorRGB(155,155,155),IIf(m1>0 AND m1>s1,ColorRGB(0,125,0),IIf(m1>0 AND m1<s1,ColorRGB(180,30,160),ColorRGB(100,0,0))));
  60.  
  61. Prd1=Param("ATR Period",4,1,20,1);
  62. Prd2=Param("Look Back",7,1,20,1);
  63. green = HHV(LLV(L,Prd1)+ATR(Prd1),Prd2);
  64. red = LLV(HHV(H,Prd1)-ATR(Prd1),Prd2);
  65. flowerClose = EMA((Open+High+Low+Close)/4,3) ;
  66. flowerOpen = EMA((Ref(Open,-1) + Ref(flowerClose,-1))/2,3);
  67. Temp = Max(High, flowerOpen);
  68. flowerHigh = EMA(Max(Temp, flowerClose),3);
  69. Temp = Min(Low,flowerOpen);
  70. flowerLow = EMA(Min(Temp, flowerClose),3);
  71. barColor=IIf(Close>Open,ColorRGB(0,245,0),ColorRGB(255,0,0));
  72.  
  73. Ctmpl = E_TSKPCOLORTMPL(Open,High,Low,Close,Volume);
  74. total = 0;
  75. total = total + IIf(tskp_colortmplcnd0 > 0, 1, -1);
  76. total = total + IIf(tskp_colortmplcnd1 > 0, 1, -1);
  77. total = total + IIf(tskp_colortmplcnd2 > 0, 1, -1);
  78. total = total + IIf(tskp_colortmplcnd3 > 0, 1, -1);
  79. total = total + IIf(tskp_colortmplcnd4 > 0, 1, -1);
  80. total = total + IIf(tskp_colortmplcnd5 > 0, 1, -1);
  81. total = total + IIf(tskp_colortmplcnd6 > 0, 1, -1);
  82. total = total + IIf(tskp_colortmplcnd7 > 0, 1, -1);
  83. total = total + IIf(tskp_colortmplcnd8 > 0, 1, -1);
  84.  
  85.  
  86. HaOpen =IIf(flowerOpen<flowerClose, flowerOpen, flowerClose) ;
  87. HaClose = IIf(flowerOpen<flowerClose, flowerClose, flowerOpen);
  88. HaHigh = flowerHigh;
  89. HaLow = flowerLow ;
  90.  
  91. for( i = 0; i < BarCount; i++ )
  92. {
  93.  
  94. if( total[i] >= 5 )
  95. Color[i] = colorLime;
  96. else if( total[i] <= -5 )
  97. Color[i] = colorRed;
  98. else
  99. Color[i] = colorWhite;
  100. }
  101.  
  102. Candle=ParamList("Candle","Modified Candlestick,Modified Heikin Ashi,Normal Candlestick",1);
  103. if(Candle=="Modified Candlestick")
  104. {
  105. ColorHighliter = myColor;
  106. SetBarFillColor( ColorHighliter );
  107. Plot (Close,"- Modified Candlestick", Color,ParamStyle( "Style", styleCandle|styleLine | styleThick, maskAll));
  108. }
  109. if(Candle=="Modified Heikin Ashi")
  110. {
  111. ColorHighliter = myColor;
  112. SetBarFillColor( ColorHighliter );
  113.  
  114. PlotOHLC( HaOpen,HaHigh,HaLow,HaClose, "Modified Heikin Ashi", Color, styleCandle|styleLine);
  115. }
  116. if(Candle=="Normal Candlestick")
  117. {
  118. //ColorHighliter = myColor;
  119. //SetBarFillColor( ColorHighliter );
  120. PlotOHLC(O,H,L,C,"Normal Candlestick",barcolor,styleCandle|styleLine);
  121. }
  122.  
  123.  
  124. _SECTION_END();
  125. _SECTION_BEGIN("CMP");
  126. GfxSelectFont("arial", 13, 700 ); GfxSetBkMode( colorWhite );
  127. GfxSetTextColor( ParamColor("Color",colorWhite) );
  128. Hor=Param("Horizontal Position",120,10,1200,1);
  129. Ver=Param("Vertical Position",185,100,50,50);
  130. GfxTextOut(""+C,Hor , Ver );
  131.  
  132.  
  133. _SECTION_END();
  134.  
  135. /*
  136. Bill William's Trading Chaos: Second Edition, Alligator.
  137. Written by EStromholt September 26, 2010
  138. */
  139.  
  140. //This is an accurate Alligator indicator based on the Mid price and smoothed as Bill Williams specifies.
  141. //This Alligator is also projected into the future as Williams prefers.
  142.  
  143.  
  144.  
  145. _SECTION_BEGIN("bwGator");
  146.  
  147. MedianPrice = (H+L)/2;
  148.  
  149. Jaw = Wilders(MedianPrice,13);
  150. Teeth = Wilders(MedianPrice, 8);
  151. Lips = Wilders(MedianPrice, 5);
  152.  
  153. Plot(Jaw, "Jaw", colorBlue, styleThick, Null, Null, 8);
  154. Plot(Teeth,"Teeth", colorRed, styleThick, Null, Null, 5);
  155. Plot(Lips, "Lips", colorGreen, styleThick, Null, Null, 3);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement