Stock Portfolio Organizer
The ultimate porfolio management solution.
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Pricious Pivots V2 for Amibroker (AFL)
this is a modification of privious “Pricious Pivots (http://www.wisestocktrader.com/indicators/3492-precious-pivots)”. Kitika asked for buy/sell Signals !
Here i have put Buy/Sell Signals along with Over Baught and Over sold Stars along with weekly long support and resistance and cloud taken from :- http://www.wisestocktrader.com/indicators/3523-pra-tts ( Thnx Jaipal7786 )
and Money Flow Formula taken from :- http://www.wisestocktrader.com/indicators/3513-mfi-based-heiken-ashi ( Thnx Kananwisha )
Rsi Value at the bar take from my post :- http://www.wisestocktrader.com/indicators/3510-rsi-value-at-the-bar
modified Ichimoku Cloud from dashed line to simple Line ( for santosh ).
removed weekly and monthly pivots supports and resistance …. !
for intraday purpase we can use our mind and can trade accordingly….!
as i had said in privious post “Pricious Pivots (http://www.wisestocktrader.com/indicators/3492-precious-pivots )”, this formula is not based on any stretagy so we can’t make TGT….!( but can think of next support or next resistance ).
when we get any signals we have to tread accordingly….!
this formula plots only pivots( hourly,Daily,weekly one), Ichimoku cloud,Long Support and Resistance.
thanx every friends for asking and encoraging me…!
Similar Indicators / Formulas
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 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 | ppl = ParamToggle ( "" , "Off|On" ,1); numbars = LastValue ( Cum ( Status ( "barvisible" ))); fraction= IIf ( StrRight ( Name (),3) == "" , 3.2, 3.2); hts = -33.5; HaClose = EMA (( O + H + L + C )/4,3); HaOpen = AMA ( Ref ( HaClose, -1 ), 0.5 ); HaHigh = Max ( H , Max ( HaClose, HaOpen ) ); HaLow = Min ( L , Min ( HaClose, HaOpen ) ); Periods= Param ( "Periods" ,14, 2, 222, 1); tp=(HaClose +HaHigh +HaLow )/3 ; newMFI=100 -(100 /(1 + Sum ( IIf (Tp> Ref (Tp,-1), V *Tp,0),Periods) / Sum ( IIf (Tp< Ref (Tp,-1), V * Tp,0),Periods) ) ); _SECTION_BEGIN ( "Indicators" ); RSI_Periods = Param ( "RSI Periods" , 2, 1, 100, 1); MA_Periods = Param ( "Periods for MAV" , 50, 1, 200, 1); Daily_Trend_MA_Pds = Param ( "Periods for Trend EMA" , 6, 1, 100, 1); MAV_Value = V / EMA ( V , MA_Periods); _SECTION_END (); // Check if previous day's close is above its 6-day EMA DailyClose = TimeFrameCompress ( Close , inDaily ); DailyEMA = EMA ( DailyClose, Daily_Trend_MA_Pds); DailyClose = TimeFrameExpand (DailyClose, inDaily , expandFirst); DailyEma = TimeFrameExpand (DailyEMA, inDaily , expandFirst); //Plot(DailyEma,"DailEma",colorCustom12,styleLine); // Trend detection based on 6EMA for Daily Daily_Trend_UP = DailyClose > DailyEMA; Daily_Trend_DOWN = DailyClose < DailyEMA; Trend_UP_Text = WriteIf (Daily_Trend_UP, "Daily Trend UP" , "" ); Trend_DOWN_Text = WriteIf (Daily_Trend_DOWN, "Daily Trend DOWN" , "" ); Trend_Neutral_Text = WriteIf ( NOT Daily_Trend_DOWN AND NOT Daily_Trend_UP, "Neutral" , "" ); TrendCol = IIf (Daily_Trend_UP, colorGreen , IIf (Daily_Trend_DOWN, colorRed , colorLightGrey )); _SECTION_END (); _SECTION_BEGIN ( "i" ); /* ICHIMOKU CHART */ n1 = Param ( "Èøèìîêó: ïåðèîä 1" ,9,1,200,1); n2 = Param ( "Èøèìîêó: ïåðèîä 2" ,26,1,400,1); n3 = Param ( "Èøèìîêó: ïåðèîä 3" ,52,1,600,1); TenkanSen =( HHV ( H ,n1)+ LLV ( L ,n1))/2; // Tenkan-sen (Òåíêàí-ñåí) – ýòî ñðåäíåå çíà÷åíèå öåíû çà ïåðâûé ïðîìåæóòîê âðåìåíè (ðàâíà (high+low)/2, ãäå high è low – ìàêñèìóì è ìèíèìóì çà ïåðèîä). KijunSen =( HHV ( H ,n2)+ LLV ( L ,n2))/2; // Kijun-sen (Êèäæóí-ñåí) – ýòî ñðåäíåå çíà÷åíèå öåíû çà âòîðîé ïðîìåæóòîê. ChinkouSpan = Ref ( C ,-n2); // Chinkou Span (×èêîó ñïåí) - öåíà çàêðûòèÿ òåêóùåãî áàðà, ñäâèíóòàÿ íàçàä íà âåëè÷èíó âòîðîãî âðåìåííîãî èíòåðâàëà. Cks = Close ; // Ãðàôè÷åñêèé Chinkou Span, ñäâèã íàçàä çàñ÷åò îòðèñîâêè. SenkouSpanA = Ref ((KijunSen+TenkanSen)/2,-n2); // Senkou Span A (Ñåíêîó ñïåí À) / Up Kumo - ñåðåäèíà ðàññòîÿíèÿ ìåæäó Tenkan-sen è Kijun-sen, ñäâèíóòîå âïåðåä íà âåëè÷èíó âòîðîãî âðåìåííîãî èíòåðâàëà. SpA =(KijunSen+TenkanSen)/2; // Ãðàôè÷åñêèé Senkou Span A , ñäâèã âïåðåä çàñ÷åò îòðèñîâêè. SenkouSpanB = Ref (( HHV ( H ,n3)+ LLV ( L ,n3))/2,-n2); // Senkou Span B (Ñåíêîó ñïåí Â) / Down Kumo - ñðåäíåå çíà÷åíèå öåíû çà òðåòèé âðåìåííîé èíòåðâàë, ñäâèíóòîå âïåðåä íà âåëè÷èíó âòîðîãî âðåìåííîãî èíòåðâàëà. SpB =( HHV ( H ,n3)+ LLV ( L ,n3))/2; // Ãðàôè÷åñêèé Senkou Span B, ñäâèã âïåðåä çàñ÷åò îòðèñîâêè. DL = Ref ( C , 25 ); Plot (SpA, "SenkouSpanA" , colorOrange , styleLine ,0,0,n2); Plot (SpB, "SenkouSpanB" , colorPink , styleLine ,0,0,n2); _SECTION_END (); _SECTION_BEGIN ( "Price" ); _N (Title = StrFormat ( "{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}" , O , H , L , C , SelectedValue ( ROC ( C , 1 ) ) )); pds = 20; MAFAST = EMA ( Close , 20 ); MASLOW = EMA ( Close , 40 ); DonchianUpper = HHV ( Ref ( H , -1 ), pds ); // Highest high value of highs in last 20 periods DonchianLower = LLV ( Ref ( L , -1 ), pds ); // Lowest low value of low in last 20 periods DonchianMiddle = ( DonchianUpper + DonchianLower ) / 2; UpTrend = C > ( LLV ( L , 20 ) + 2 * ATR ( 10 ) ) AND EMA ( Close , 20 ) > EMA ( Close , 40 ); DnTrend = C < ( HHV ( H , 20 ) - 2 * ATR ( 10 ) ) AND EMA ( Close , 20 ) < EMA ( Close , 40 ); Color = IIf ( UpTrend, colorBlue , IIf ( DnTrend, colorRed , colorYellow ) ); UpTrend= ExRem (UpTrend,DnTrend); Dntrend= ExRem (DnTrend,UpTrend); // Plots a 20 period Donchian channel Plot ( C , "Price" , Color, styleCandle | styleThick ); numbars = LastValue ( Cum ( Status ( "barvisible" ))); fraction= IIf ( StrRight ( Name (),3) == "" ,3.2,3.2); bhts = Param ( "Text Shift" , -50,-100,1000,5); PlotText ( ">>" + WriteVal ( RSI (14),fraction), SelectedValue ( BarIndex ()+1)-(numbars/bhts), SelectedValue ( C ), colorWhite ); mhts = Param ( "MFI Text Shift" , -15,-100,1000,5); PlotText ( "|| " + WriteVal (newMFI,fraction), SelectedValue ( BarIndex ()+5)-(numbars/mhts), SelectedValue ( C ), colorWhite ); NewDay = IIf ( Day () != Ref ( Day (), -1) OR BarIndex () == LastValue ( BarIndex ()), 1, 0); //Plot(NewDay, "", 47, 2 + 32768 + 4096, Minvalue = 0, Maxvalue = 1); PlotShapes ( IIf (UpTrend, shapeUpArrow , shapeNone ), colorBrightGreen , 0, L , Offset=-45); PlotShapes ( IIf (DnTrend, shapeDownArrow , shapeNone ), colorRed , 0, H , Offset=-45); _SECTION_END (); mybuy= RSI (14)<30 & newMFI<20; mysell= RSI (14)>70 & newMFI>80; //mybuy=ExRem(mybuy,mysell); //mysell=ExRem(mysell,mybuy); PlotShapes (shapeHollowSmallUpTriangle * mybuy, colorBrightGreen ,0, L , Offset=-47); PlotShapes (shapeHollowSmallDownTriangle * mybuy, colorBrightGreen ,0, L , Offset=45); PlotShapes (shapeHollowSmallDownTriangle * mysell, colorRed ,0, H , Offset=-47); PlotShapes (shapeHollowSmallUpTriangle * mysell, colorRed ,0, H , Offset=45); _SECTION_BEGIN ( "PIVOT POINTS" ); /* This code calculates the previous days high, low and close */ Hi1 = IIf ( Day ()!= Ref ( Day (),-1), Ref ( HighestSince ( Day ()!= Ref ( Day (),-1), H ,1),-1),0); Hi = ValueWhen ( Day ()!= Ref ( Day (),-1),Hi1,1); Lo1 = IIf ( Day ()!= Ref ( Day (),-1), Ref ( LowestSince ( Day ()!= Ref ( Day (),-1), L ,1),-1),0); Lo = ValueWhen ( Day ()!= Ref ( Day (),-1),Lo1,1); Cl1 = IIf ( Day ()!= Ref ( Day (),-1), Ref ( C ,-1),0); C1 = ValueWhen ( Day ()!= Ref ( Day (),-1),Cl1,1); wHi= TimeFrameGetPrice ( "H" , inWeekly ,-1); wLo= TimeFrameGetPrice ( "L" , inWeekly ,-1); wCl= TimeFrameGetPrice ( "C" , inWeekly ,-1); mHi= TimeFrameGetPrice ( "H" , inMonthly ,-1); mLo= TimeFrameGetPrice ( "L" , inMonthly ,-1); mCl= TimeFrameGetPrice ( "C" , inMonthly ,-1); //---------------------------------------------------------------------------------- /* This code calculates Daily Piovts */ rg = (Hi - Lo); bp = (Hi + Lo + C1)/3; bpI = LastValue (bp,1); r1 = (bp*2)-Lo; r1I = LastValue (r1,1); s1 = (bp*2)-Hi; s1I = LastValue (s1,1); r2 = bp + r1 - s1; r2I = LastValue (r2,1); s2 = bp - r1 + s1; s2I = LastValue (s2,1); r3 = bp + r2 - s1; r3I = LastValue (r3,1); s3 = bp - r2 + s1; s3I = LastValue (s3,1); r4 = bp + r2 - s2; r4I = LastValue (r4,1); s4 = bp - r2 + s2; s4I = LastValue (s4,1); wrg = (wHi - wLo); wbp = (wHi + wLo + wCl)/3; wbpI = LastValue (wbp,1); wr1 = (wbp*2)-wLo; wr1I = LastValue (wr1,1); ws1 = (wbp*2)-wHi; ws1I = LastValue (ws1,1); wr2 = wbp + wr1 - ws1; wr2I = LastValue (wr2,1); ws2 = wbp - wr1 + ws1; ws2I = LastValue (ws2,1); wr3 = wbp + wr2 - ws1; wr3I = LastValue (wr3,1); ws3 = wbp - wr2 + ws1; ws3I = LastValue (ws3,1); wr4 = wbp + wr2 - ws2; wr4I = LastValue (wr4,1); ws4 = wbp - wr2 + ws2; ws4I = LastValue (ws4,1); mrg = (mHi - mLo); mobp = (mHi + mLo + mCl)/3; mobpI = LastValue (mobp,1); mr1 = (mobp*2)-mLo; mr1I = LastValue (mr1,1); ms1 = (mobp*2)-mHi; ms1I = LastValue (ms1,1); mr2 = mobp + mr1 - ms1; mr2I = LastValue (mr2,1); ms2 = mobp - mr1 + ms1; ms2I = LastValue (ms2,1); if (ppl==1) { Plot (bp, "" , colorBlue , styleDashed | styleLine | styleNoRescale ); Plot (s1, "" , colorRed , styleDashed | styleNoRescale ); Plot (s2, "" , colorRed , styleDashed | styleNoRescale ); Plot (s3, "" , colorRed , styleDashed | styleNoRescale ); Plot (s4, "" , colorRed , styleDashed | styleNoRescale ); Plot (r1, "" , colorGreen , styleDashed | styleNoRescale ); Plot (r2, "" , colorGreen , styleDashed | styleNoRescale ); Plot (r3, "" , colorGreen , styleDashed | styleNoRescale ); Plot (r4, "" , colorGreen , styleDashed | styleNoRescale ); Plot (wbp, "" , colorTan , styleDashed | styleLine | styleNoRescale ); Plot (ws1, "" , colorPaleGreen , styleDashed | styleNoRescale ); Plot (wr1, "" , colorPaleBlue , styleDashed | styleNoRescale ); PlotText ( " Pivot = " + WriteVal (bp,fraction), LastValue ( BarIndex ())-(numbars/Hts), bpI +0.05, colorBlue ); PlotText ( " Resistance 1 = " + WriteVal (r1,fraction), LastValue ( BarIndex ())-(numbars/Hts), r1I +0.05, colorGreen ); PlotText ( " Support 1 = " + WriteVal (s1,fraction), LastValue ( BarIndex ())-(numbars/Hts), s1I +0.05, colorRed ); PlotText ( " Resistance 2 = " + WriteVal (r2,fraction), LastValue ( BarIndex ())-(numbars/Hts), r2I +0.05, colorGreen ); PlotText ( " Support 2 = " + WriteVal (s2,fraction), LastValue ( BarIndex ())-(numbars/Hts), s2I +0.05, colorRed ); PlotText ( " Resistance 3 = " + WriteVal (r3,fraction), LastValue ( BarIndex ())-(numbars/Hts), r3I +0.05, colorGreen ); PlotText ( " Support 3 = " + WriteVal (s3,fraction), LastValue ( BarIndex ())-(numbars/Hts), s3I +0.05, colorRed ); PlotText ( " Resistance 4 = " + WriteVal (r4,fraction), LastValue ( BarIndex ())-(numbars/Hts), r4I +0.05, colorGreen ); PlotText ( " Support 4 = " + WriteVal (s4,fraction), LastValue ( BarIndex ())-(numbars/Hts), s4I +0.05, colorRed ); PlotText ( " W Pivot = " + WriteVal (wbp,fraction), LastValue ( BarIndex ())-(numbars/Hts), wbpI +0.05, colorTan ); PlotText ( " W Resistance 1 = " + WriteVal (wr1,fraction), LastValue ( BarIndex ())-(numbars/Hts), wr1I +0.05, colorPaleBlue ); PlotText ( " W Support 1 = " + WriteVal (ws1,fraction), LastValue ( BarIndex ())-(numbars/Hts), ws1I +0.05, colorPaleGreen ); } _SECTION_END (); _SECTION_BEGIN ( "L.T.P." ); cx = Param ( "cxposn" , 1000, 0, 1250, 1 ); cy = Param ( "cyposn" , 25, 0, 500, 1 ); GfxSelectFont ( "Candara" , 18, 98, False ); gfxcup = SelectedValue ( C > Ref ( C ,-1)); gfxpcolor = IIf (gfxcup, colorBrightGreen , colorRed ); GfxSetTextColor (gfxpcolor); //GfxSetTextColor( colorWhite ); GfxTextOut ( "L.T.P. " + C + " " , cx, cy ); _SECTION_END (); _SECTION_BEGIN ( "Background text" ); SetChartBkColor ( colorBlack ); strWeekday = StrMid ( "---sunday---Monday--TuesdayWednesday-Thursday--Friday--Saturday" , SelectedValue ( DayOfWeek ())*9,9); GraphXSpace = Param ( "GraphXSpace" ,0,-55,200,1); C13= Param ( "fonts" ,20,10,30,1 ); C14= Param ( "left-right" ,2.1,1.0,5.0,0.1 ); C15= Param ( "up-down" ,12,1,20,1 ); Miny = Status ( "axisminy" ); Maxy = Status ( "axismaxy" ); lvb = Status ( "lastvisiblebar" ); fvb = Status ( "firstvisiblebar" ); pxwidth = Status ( "pxwidth" ); pxheight = Status ( "pxheight" ); GfxSetBkMode (transparent=1); GfxSetOverlayMode (1); GfxSelectFont ( "Candara" , Status ( "pxheight" )/C13 ); GfxSetTextAlign ( 6 ); GfxSetTextColor ( ColorRGB (217,217,213)); GfxTextOut ( Name (), Status ( "pxwidth" )/C14, Status ( "pxheight" )/C15 ); GfxSelectFont ( "Tahoma" , Status ( "pxheight" )/C13*0.5 ); GfxSetTextColor ( ColorRGB (103,103,103)); GfxTextOut ( "By" , Status ( "pxwidth" )/C14, Status ( "pxheight" )/C15*2.5 ); GfxSelectFont ( "Candara" , Status ( "pxheight" )/C13*0.5 ); GfxSetTextColor ( ColorRGB (103,103,103)); GfxTextOut ( "Sai Stock Broking 09825340778" , Status ( "pxwidth" )/C14, Status ( "pxheight" )/C15*4 ); GfxSelectFont ( "MS Sans Serif" , 10, 500, False , False , 0); _SECTION_END (); _SECTION_BEGIN ( "Title" ); DODay = TimeFrameGetPrice ( "O" , inDaily ); DHiDay = TimeFrameGetPrice ( "H" , inDaily ); DLoDay = TimeFrameGetPrice ( "L" , inDaily ); Title = EncodeColor ( colorWhite )+ "* SAI STOCK BROKING 09825340778 * " + EncodeColor ( colorWhite )+ Name () + ", " + Interval (2) + ", " + Date () + " - " +strWeekday + " - " + EncodeColor ( colorWhite ) + "\nO " + EncodeColor ( colorWhite ) + O + ", H : " + H + ", L : " + L + ", C : " + C + "\n" + EncodeColor ( colorWhite )+ " Day-Open : " +DODay + " Day-High : " +DHiDay + " Day-Low : " + DLoDay + "\n" + EncodeColor ( colorRed ) + Trend_Down_Text + EncodeColor ( colorBrightGreen ) + Trend_Up_Text + EncodeColor ( colorWhite ) + Trend_Neutral_Text + EncodeColor ( colorCustom12 ) + " || Trend value: " + WriteVal (DailyEMA,1) ; _SECTION_BEGIN ( "Time Left" ); function GetSecondNum() { Time = Now ( 4 ); Seconds = int ( Time % 100 ); Minutes = int ( Time / 100 % 100 ); Hours = int ( Time / 10000 % 100 ); SecondNum = int ( Hours * 60 * 60 + Minutes * 60 + Seconds ); return SecondNum; } RequestTimedRefresh ( 1 ); TimeFrame = Interval (); SecNumber = GetSecondNum(); Newperiod = SecNumber % TimeFrame == 0; SecsLeft = SecNumber - int ( SecNumber / TimeFrame ) * TimeFrame; SecsToGo = TimeFrame - SecsLeft; x= Param ( "xposn" ,430,0,1000,1); y= Param ( "yposn" ,40,0,1000,1); GfxSelectSolidBrush ( ColorRGB ( 230, 230, 230 ) ); GfxSelectPen ( ColorRGB ( 230, 230, 230 ), 2 ); if ( NewPeriod ) { GfxSelectSolidBrush ( colorYellow ); GfxSelectPen ( colorYellow , 2 ); Say ( "New period" ); } cx = Param ( "cxposn" , 1100, 0, 1250, 1 ); cy = Param ( "cyposn" , 10, 0, 500, 1 ); GfxSelectFont ( "Candara" , 12, 98, False ); //gfxcup = SelectedValue(C > Ref(C,-1)); //gfxpcolor = IIf(gfxcup,colorBrightGreen,colorRed); GfxSetTextColor ( colorRed ); //GfxSetTextColor( colorWhite ); GfxTextOut ( "T i m e L e f t " + SecsToGo + " " , cx, cy ); _SECTION_END (); _SECTION_BEGIN ( "PIVOTS Hourly" ); TimeFrameSet ( inHourly ); HourlyH= LastValue ( Ref ( H ,-1)); HourlyL= LastValue ( Ref ( L ,-1)); HourlyC= LastValue ( Ref ( C ,-1)); TimeFrameRestore (); //Daily HPP = (HourlyL + HourlyH + HourlyC)/3;HPPI = LastValue (HPP,1); HR1 = (2 * HPP) - HourlyL;HR1I = LastValue (HR1,1); HS1 = (2 * HPP) - HourlyH;HS1I = LastValue (HS1,1); HR2 = HPP + (HourlyH - HourlyL);HR2I = LastValue (HR2,1); HS2 = HPP - (HourlyH - HourlyL);HS2I = LastValue (HS2,1); HR3 = HourlyH + 2*(HPP - HourlyL);HR3I = LastValue (HR3,1); HS3 = HourlyL - 2*(HourlyH - HPP);HS3I = LastValue (HS3,1); SHOWDPIVOTS = ParamToggle ( "Hourly Pivots" , "No|Yes" ,0); SHOW3 = ParamToggle ( "3rd Line" , "No|Yes" ,0); for (i= BarCount -2;i>( BarCount -13);i--) //set the last bars to the final PP value { HPP[i] = HPP[ BarCount -1]; HR1[i] = HR1[ BarCount -1]; HR2[i] = HR2[ BarCount -1]; HS1[i] = HS1[ BarCount -1]; HS2[i] = HS2[ BarCount -1]; ColorG[i] = colorGreen ; ColorB[i] = colorBlue ; ColorR[i] = colorRed ; } // // Conceal all but the trailing portion of the line // for (i=0;i< BarCount -15;i++) //hide the line except most recent 15 bars { ColorR[i] = ColorG[i] = ColorB[i] = colorBlack ; } if (SHOWDPIVOTS) { Plot (HR2, "R2" ,ColorG); Plot (HR1, "R1" ,ColorG); Plot (HPP, "PP" ,ColorB); Plot (HS1, "S1" ,ColorR); Plot (HS2, "S2" ,ColorR); PlotText ( " H Pivot = " + WriteVal (HPP,fraction), LastValue ( BarIndex ())-(numbars/Hts), HPPI +0.05, colorBlue ); PlotText ( " H Resis 1 = " + WriteVal (HR1,fraction), LastValue ( BarIndex ())-(numbars/Hts), HR1I +0.05, colorGreen ); PlotText ( " H Sup 1 = " + WriteVal (HS1,fraction), LastValue ( BarIndex ())-(numbars/Hts), HS1I +0.05, colorRed ); PlotText ( " H Resis 2 = " + WriteVal (HR2,fraction), LastValue ( BarIndex ())-(numbars/Hts), HR2I +0.05, colorGreen ); PlotText ( " H Sup 2 = " + WriteVal (HS2,fraction), LastValue ( BarIndex ())-(numbars/Hts), HS2I +0.05, colorRed ); } if (SHOWDPIVOTS & SHOW3) { Plot (HS3, "S3" ,ColorR); Plot (HR3, "R3" ,ColorG); PlotText ( " H Resis 3 = " + WriteVal (HR3,fraction), LastValue ( BarIndex ())-(numbars/Hts), HR3I +0.05, colorGreen ); PlotText ( " H Sup 3 = " + WriteVal (HS3,fraction), LastValue ( BarIndex ())-(numbars/Hts), HS3I +0.05, colorRed ); } _SECTION_END (); _SECTION_BEGIN ( "SupRes_Short" ); supresshortcolor= ParamColor ( "SupResShort" , ColorRGB (82,82,82)); //this is for short term support line TimeFrameSet ( inWeekly ); ShortSupLenght= Param ( "ShortResistLength" , 4, 1, 55 ,1); ShortSupCond1= HHV ( High ,ShortSupLenght); ShortSupCond2= Close < Ref ( LLV ( Low ,4),-1); ShortSupA= IIf ( L > Ref (ShortSupCond2,-1),1, IIf ( H < Ref (ShortSupCond1,-1),-1,0)); ShortSupB= ValueWhen (ShortSupA!=0,ShortSupA,1); ShortSupResult= IIf (ShortSupB==1,ShortSupCond1,ShortSupCond2); TimeFrameRestore (); FinalShortSup= TimeFrameExpand (ShortSupResult, inWeekly ,expandFirst); Plot (FinalShortSup , "ShortResistance" ,supresshortcolor, styleLine | styleStaircase | styleThick | styleNoRescale | styleNoLabel | styleNoTitle ); //this is for short term resistance line TimeFrameSet ( inWeekly ); ShortResLenght= Param ( "ShortSupportLenght" , 4, 1, 55 ,1); ShortResCond1= Close > Ref ( HHV ( High ,4),-1); ShortResCond2= LLV ( Low ,ShortResLenght); ShortResA= IIf ( H > Ref (ShortResCond1,-1),1, IIf ( L < Ref (ShortResCond2,-1),-1,0)); ShortResB= ValueWhen (ShortResA!=0,ShortResA,1); ShortResResult= IIf (ShortResB==1,ShortResCond2,ShortResCond1); TimeFrameRestore (); FinalShortRes= TimeFrameExpand (ShortResResult, inWeekly ,expandFirst); Plot (FinalShortRes , "ShortSupport" ,supresshortcolor, styleLine | styleThick | styleStaircase | styleNoRescale | styleNoLabel | styleNoTitle ); CS=FinalShortSup; CR=FinalShortRes; Step = (CR-CS)/4; KC = CS + Step; KB = KC + Step; KA = KB + Step; CloudColor1 = ParamColor ( "CloudColor1" , ColorRGB (128,31,17)); CloudColor2 = ParamColor ( "CloudColor2" , ColorRGB (139,139,0)); CloudColor3 = ParamColor ( "CloudColor3" , ColorRGB (1,70,1)); CloudColor4 = ParamColor ( "CloudColor4" , ColorRGB (41,105,05)); PlotOHLC ( CS, CS, KC,KC, "Band" , CloudColor1, styleCloud | styleThick | styleDashed | styleNoLabel | styleNoTitle | styleNoRescale ); PlotOHLC ( KC, KC, KB,KB, "Band" , CloudColor2, styleCloud | styleThick | styleDashed | styleNoLabel | styleNoTitle | styleNoRescale ); PlotOHLC ( KB, KB, KA,KA, "Band" , CloudColor3, styleCloud | styleThick | styleDashed | styleNoLabel | styleNoTitle | styleNoRescale ); PlotOHLC ( KA, KA, CR,CR, "Band" , CloudColor4, styleCloud | styleThick | styleDashed | styleNoLabel | styleNoTitle | styleNoRescale ); _SECTION_END (); _SECTION_BEGIN ( "SupRes_Long" ); supreslongcolor= ParamColor ( "SupReslong" , ColorRGB (0,0,234)); //this is for long term resistance line TimeFrameSet ( inWeekly ); LongResLength= Param ( "ResistanceLength" , 30, 1, 55 ,1); LongResCond1= HHV ( H ,LongResLength); LongResCond2= Close < Ref ( LLV ( Low ,4),-1); LongResA= IIf ( L > Ref (LongResCond2,-1),1, IIf ( H < Ref (LongResCond1,-1),-1,0)); LongResB= ValueWhen (LongResA!=0,LongResA,1); LongResResult= IIf (LongResB==1,LongResCond1,LongResCond2); TimeFrameRestore (); FinalResResult= TimeFrameExpand (LongResResult, inWeekly ,expandFirst); Plot (FinalResResult , "Resistance" ,supreslongcolor, styleLine | styleThick | styleDashed | styleNoRescale | styleNoLabel | styleNoTitle ); //this is for long term support line TimeFrameSet ( inWeekly ); LongSupLenght= Param ( "SupportLenght" , 30, 1, 55 ,1); LongSupCond1= Close > Ref ( HHV ( High ,4),-1); LongSupCond2= LLV ( Low ,LongSupLenght); LongSupA= IIf ( H > Ref (LongSupCond1,-1),1, IIf ( L < Ref (LongSupCond2,-1),-1,0)); LongSupB= ValueWhen (LongSupA!=0,LongSupA,1); LongSupResult= IIf (LongSupB==1,LongSupCond2,LongSupCond1); TimeFrameRestore (); FinalSupResult= TimeFrameExpand (LongSupResult, inWeekly ,expandFirst); Plot (FinalSupResult , "Support" ,supreslongcolor, styleLine | styleThick | styleDashed | styleNoRescale | styleNoLabel | styleNoTitle ); CloudResColor= ParamColor ( "LongColor" , ColorRGB (0,0,45)); CS1=FinalResResult; CR1=FinalSupResult; //PlotOHLC( CS1, CS1, CR1,CR1, "", CloudResColor, styleCloud |styleStaircase|styleNoRescale| styleNoLabel|styleNoTitle); _SECTION_END (); |
2 comments
Leave Comment
Please login here to leave a comment.
Back
thanks for listening e but still feeling incomplete no messege box given levels also when reversal change plz add this also i am expecting complete afl from u sir u can do it sir tell i will help u ……..
@kitika,
thanx kitika, even i had told you, “you have my number….!”
waiting for your help……!!!