{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} {\*\expandedcolortbl;;} \margl1440\margr1440\vieww10800\viewh8400\viewkind0 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 \f0\fs24 \cf0 declare upper; \ input length = \{default \'932\'94, \'933\'94\}; \ input ChartBubblesON = Yes; \ input LinesON = Yes;\ \ plot data; \ rec top; \ rec bot;\ \ switch (length) \{ \ case \'932\'94:\ data= If !ChartBubblesON then \ Double.NaN else if Low < Low[1] && Low < Low[-1] && Low < Low[2] && Low < Low[-2] then \ Low else if High > High[1] && High > High[-1] && High > High[2] && High > High[-2] then \ High else Double.NaN;\ top = if High > High[1] && High > High[-1] && High > High[2] && High > High[-2] then High else top[1]; \ bot = if Low < Low[1] && Low < Low[-1] && Low < Low[2] && Low < Low[-2] then Low else bot[1]; \ case \'933\'94: \ data = If !ChartBubblesON then \ Double.NaN else if Low < Low[1] && Low < Low[-1] && Low < Low[2] && Low < Low[-2] && Low < Low[3] && Low < Low[-3] then \ Low else if High > High[1] && High > High[-1] && High > High[2] && High > High[-2] && High > High[3] && High > High[-3] then \ High else Double.NaN;\ top = if High > High[1] && High > High[-1] && High > High[2] && High > High[-2] && High > High[3] && High > High[-3] then High else top[1]; \ bot = if Low < Low[1] && Low < Low[-1] && Low < Low[2] && Low < Low[-2] && Low < Low[3] && Low < Low[-3] then Low else bot[1]; \ \}\ \ Data.SetPaintingStrategy(PaintingStrategy.points); \ Data.SetLineWeight(1); \ Data.SetDefaultColor(color.yellow); \ Data.HideBubble(); \ AddChartBubble(1, Data, concat(\'93\'94, data), color.white);\ \ plot topline = if !LinesOn then Double.NaN else top; \ topline.SetLineWeight(1); \ topline.SetDefaultColor(color.yellow); \ topline.SetPaintingStrategy(PaintingStrategy.dashes); \ plot bottomline = if !LinesOn then Double.NaN else bot; \ bottomline.SetLineWeight(1); \ bottomline.SetDefaultColor(color.yellow); \ bottomline.SetPaintingStrategy(PaintingStrategy.dashes); \ def Sell = TTM_ScalperAlert().PivotLow; \ def Buy = TTM_ScalperAlert(); \ Alert(Sell, \'93Sell Signal\'94, sound = Sound.Chimes); \ Alert(Buy, \'93Buy Signal\'94, sound = Sound.Chimes);}