├── README.md ├── Radarscreen └── BL_Bounce.txt └── Scanner └── BL_$NetChg Period.txt /README.md: -------------------------------------------------------------------------------- 1 | # EasyLanguage 2 | A collection of EasyLanguage scripts to be used in TradeStation or perhaps MultiCharts. 3 | -------------------------------------------------------------------------------- /Radarscreen/BL_Bounce.txt: -------------------------------------------------------------------------------- 1 | { 2 | This indicator is designed to be used in the Radarscreen. 3 | It will show when a stock is bounce up or down through 4 | a moving average (ema8, ema21, ema34, sma50, or sma200). 5 | It will also scan for setups like JHook, Pinball, or 6 | 2 bars down and 1 bar up, 2 bars up and 1 bar down, etc. 7 | } 8 | 9 | inputs: 10 | BGValue(60); 11 | 12 | var: 13 | ema8(0), 14 | ema21(0), 15 | ema34(0), 16 | sma50(0), 17 | sma200(0), 18 | Result(0), 19 | v8emaFlag(0), 20 | v21emaFlag(0), 21 | v34emaFlag(0), 22 | v50maFlag(0), 23 | v200maFlag(0), 24 | v2DU1RFlag(0), 25 | v2LH1RFlag(0), 26 | // vTLineFlag(false), 27 | vJHookFlag(0), 28 | vPinballFlag(0), 29 | AlertLong(false), 30 | AlertShort(false), 31 | Color(0); 32 | 33 | ema8 = xAverage(close, 8); 34 | ema21 = xAverage(close, 21); 35 | ema34 = xAverage(close, 34); 36 | sma50 = AverageFC2(close, 50); 37 | sma200 = AverageFC2(close, 200); 38 | 39 | AlertLong = false; 40 | AlertShort = false; 41 | 42 | v8emaFlag = 0; 43 | v21emaFlag = 0; 44 | v34emaFlag = 0; 45 | v50maFlag = 0; 46 | v200maFlag = 0; 47 | v2DU1RFlag = 0; 48 | v2LH1RFlag = 0; 49 | //vTLineFlag = false; 50 | vJHookFlag = 0; 51 | vPinballFlag = 0; 52 | 53 | // 8ema 54 | if (Highest(high[1], 3) > ema8[1] and (close[1] <= ema8[1] or low < ema8)) and 55 | close > close[1] and 56 | close > open and 57 | (high - close) < ((high - low)*0.5) and 58 | close > ema8 and 59 | ema8 >= ema21 then begin 60 | Plot1( "8ema", "8ema", green); 61 | SetPlotBGColor(1, iff(v8emaFlag[1] = 1, black, rgb(0, BGValue, 0))); 62 | v8emaFlag = 1; 63 | AlertLong = true; 64 | end 65 | else if (Lowest(low[1], 3) < ema8[1] and (close[1] >= ema8[1] or high > ema8)) and 66 | close < close[1] and 67 | close < open and 68 | (close - low) < ((high - low)*0.5) and 69 | close < ema8 and 70 | ema8 <= ema21 then begin 71 | Plot1( "8ema", "8ema", red); 72 | SetPlotBGColor(1, iff(v8emaFlag[1] = -1, black, rgb(BGValue,0,0))); 73 | v8emaFlag = -1; 74 | AlertShort = true; 75 | end 76 | else begin 77 | v8emaFlag = 0; 78 | NoPlot(1); 79 | end; 80 | 81 | // 21ema 82 | if (Highest(high[1], 3) > ema21[1] and (close[1] <= ema21[1] or low < ema21)) and 83 | close > close[1] and 84 | close > open and 85 | (high - close) < ((high - low)*0.5) and 86 | close > ema21 and 87 | ema8 >= ema21 then begin 88 | Plot2( "21ema", "21ema", green); 89 | SetPlotBGColor(2, iff(v21emaFlag[1] = 1, black, rgb(0, BGValue, 0))); 90 | v21emaFlag = 1; 91 | AlertLong = true; 92 | end 93 | else if (Lowest(low[1], 3) < ema21[1] and (close[1] >= ema21[1] or high > ema21)) and 94 | close < close[1] and 95 | close < open and 96 | (close - low) < ((high - low)*0.5) and 97 | close < ema21 and 98 | ema8 <= ema21 then begin 99 | Plot2( "21ema", "21ema", red); 100 | SetPlotBGColor(2, iff(v21emaFlag[1] = -1, black, rgb(BGValue,0,0))); 101 | v21emaFlag = -1; 102 | AlertShort = true; 103 | end 104 | else begin 105 | v21emaFlag = 0; 106 | NoPlot(2); 107 | end; 108 | 109 | // 34ema 110 | if (Highest(high[1], 3) > ema34[1] and (close[1] <= ema34[1] or low < ema34)) and 111 | close > close[1] and 112 | close > open and 113 | (high - close) < ((high - low)*0.5) and 114 | close > ema34 and 115 | ema21 >= ema34 then begin 116 | Plot3( "34ema", "34ema", green); 117 | SetPlotBGColor(3, iff(v34emaFlag[1] = 1, black, rgb(0, BGValue, 0))); 118 | v34emaFlag = 1; 119 | AlertLong = true; 120 | end 121 | else if (Lowest(low[1], 3) < ema34[1] and (close[1] >= ema34[1] or high > ema34)) and 122 | close < close[1] and 123 | close < open and 124 | (close - low) < ((high - low)*0.5) and 125 | close < ema34 and 126 | ema21 <= ema34 then begin 127 | Plot3( "34ema", "34ema", red); 128 | SetPlotBGColor(3, iff(v34emaFlag[1] = -1, black, rgb(BGValue,0,0))); 129 | v34emaFlag = -1; 130 | AlertShort = true; 131 | end 132 | else begin 133 | v34emaFlag = 0; 134 | NoPlot(3); 135 | end; 136 | 137 | // 50sma 138 | if (Highest(high[1], 3) > sma50[1] and (close[1] <= sma50[1] or low < sma50)) and 139 | close > close[1] and 140 | close > open and 141 | (high - close) < ((high - low)*0.5) and 142 | close > sma50 and 143 | ema34 >= sma50 then begin 144 | Plot4( "50sma", "50sma", green); 145 | SetPlotBGColor(4, iff(v50maFlag[1] = 1, black, rgb(0, BGValue, 0))); 146 | v50maFlag = 1; 147 | AlertLong = true; 148 | end 149 | else if (Lowest(low[1], 3) < sma50[1] and (close[1] >= sma50[1] or high > sma50)) and 150 | close < close[1] and 151 | close < open and 152 | (close - low) < ((high - low)*0.5) and 153 | close < sma50 and 154 | ema34 <= sma50 then begin 155 | Plot4( "50sma", "50sma", red); 156 | SetPlotBGColor(4, iff(v50maFlag[1] = -1, black, rgb(BGValue,0,0))); 157 | v50maFlag = -1; 158 | AlertShort = true; 159 | end 160 | else begin 161 | v50maFlag = 0; 162 | NoPlot(4); 163 | end; 164 | 165 | // 200sma 166 | if (Highest(high[1], 3) > sma200[1] and (close[1] <= sma200[1] or low < sma200)) and 167 | close > close[1] and 168 | close > open and 169 | (high - close) < ((high - low)*0.5) and 170 | close > sma200 and 171 | sma50 >= sma200 then begin 172 | Plot5( "200sma", "200sma", green); 173 | SetPlotBGColor(5, iff(v200maFlag[1] = 1, black, rgb(0, BGValue, 0))); 174 | v200maFlag = 1; 175 | AlertLong = true; 176 | end 177 | else if (Lowest(low[1], 3) < sma200[1] and (close[1] >= sma200[1] or high > sma200)) and 178 | close < close[1] and 179 | close < open and 180 | (close - low) < ((high - low)*0.5) and 181 | close < sma200 and 182 | sma50 <= sma200 then begin 183 | Plot5( "200sma", "200sma", red); 184 | SetPlotBGColor(5, iff(v200maFlag[1] = -1, black, rgb(BGValue,0,0))); 185 | v200maFlag = -1; 186 | AlertShort = true; 187 | end 188 | else begin 189 | v200maFlag = 0; 190 | NoPlot(5); 191 | end; 192 | 193 | // 2 Dn-1 Up 194 | if close[2] < close[3] and 195 | close[1] < close[2] and 196 | close > high[1] and 197 | ema34 >= sma50 and 198 | (high - close) < ((high - low)*0.5) and 199 | close > close[1] and 200 | close > open then begin 201 | Plot6( "2C-1R", "2C-1R", green); 202 | SetPlotBGColor(6, iff(v2DU1RFlag[1] = 1, black, rgb(0, BGValue, 0))); 203 | v2DU1RFlag = 1; 204 | AlertLong = true; 205 | end 206 | else if close[2] > close[3] and 207 | close[1] > close[2] and 208 | close < low[1] and 209 | ema34 <= sma50 and 210 | (close - low) < ((high - low)*0.5) and 211 | close < close[1] and 212 | close < open then begin 213 | Plot6( "2C-1R", "2C-1R", red); 214 | SetPlotBGColor(6, iff(v2DU1RFlag[1] = -1, black, rgb(BGValue,0,0))); 215 | v2DU1RFlag = -1; 216 | AlertShort = true; 217 | end 218 | else begin 219 | v2DU1RFlag = 0; 220 | NoPlot(6); 221 | end; 222 | 223 | // 2 Low/High-1 Up/Dn 224 | if low[2] < low[3] and 225 | low[1] < low[2] and 226 | // low < low[1] and 227 | close > high[1] and 228 | ema34 >= sma50 and 229 | (high - close) < ((high - low)*0.5) and 230 | close > close[1] and 231 | close > open then begin 232 | Plot7( "2LH-1R", "2LH-1R", green); 233 | SetPlotBGColor(7, iff(v2LH1RFlag[1] = 1, black, rgb(0, BGValue, 0))); 234 | v2LH1RFlag = 1; 235 | AlertLong = true; 236 | end 237 | else if high[2] > high[3] and 238 | high[1] > high[2] and 239 | // high > high[1] and 240 | close < low[1] and 241 | ema34 <= sma50 and 242 | (close - low) < ((high - low)*0.5) and 243 | close < close[1] and 244 | close < open then begin 245 | Plot7( "2LH-1R", "2LH-1R", red); 246 | SetPlotBGColor(7, iff(v2LH1RFlag[1] = -1, black, rgb(BGValue,0,0))); 247 | v2LH1RFlag = -1; 248 | AlertShort = true; 249 | end 250 | else begin 251 | v2LH1RFlag = 0; 252 | NoPlot(7); 253 | end; 254 | 255 | Commentary("low[2] < low[3] ", low[2] < low[3], newline, 256 | "low[1] < low[2] ", low[1] < low[2], newline, 257 | // low < low[1] and 258 | "close > high[1] ", close > high[1], newline, 259 | "ema34 >= sma50 ", ema34 >= sma50, newline, 260 | "(high - close) < ((high - low)*0.5) ", (high - close) < ((high - low)*0.5), newline, 261 | "close > open ", close > open, newline); 262 | 263 | //Plot8(low[2] < low[3], "1"); 264 | //Plot9(low[1] < low[2], "2"); 265 | //Plot10(close > high[1], "3"); 266 | //Plot11(ema34 >= sma50, "4"); 267 | //Plot12((high - close) < ((high - low)*0.5), "5"); 268 | //Plot13(close > open, "6"); 269 | 270 | 271 | { 272 | // Tline 273 | if ShowTLineBounce then begin 274 | if close[1] <= ema8[1] and 275 | last > ema8 and 276 | ema8 >= ema34 and 277 | ema34 >= sma50 and 278 | last > open then begin 279 | Plot8( "X", "TLine", iff(vTLineFlag[1], darkgreen, green)); 280 | vTLineFlag= true; 281 | AlertLong = true; 282 | end 283 | else if close[1] >= ema8[1] and 284 | last < ema8 and 285 | ema8 <= ema34 and 286 | ema34 <= sma50 and 287 | last < open then begin 288 | Plot8( "X", "TLine", iff(vTLineFlag[1], darkred, red)); 289 | vTLineFlag= true; 290 | AlertShort = true; 291 | end; 292 | end; 293 | } 294 | // JHook 295 | if ema8 >= ema34 and 296 | ema34 >= sma50 and 297 | close[1] <= ema8 and 298 | last > ema8 and 299 | last > open and 300 | last > high[1] then begin 301 | Plot9("JHook", "JHook", iff(vJHookFlag[1] = 1, darkgreen, green)); 302 | vJHookFlag= 1; 303 | AlertLong = true; 304 | end 305 | else if ema8 <= ema34 and 306 | ema34 <= sma50 and 307 | close[1] >= ema8 and 308 | last < ema8 and 309 | last < open and 310 | last < low[1] then begin 311 | Plot9("JHook", "JHook", iff(vJHookFlag[1] = -1, darkred, red)); 312 | vJHookFlag= -1; 313 | AlertShort = true; 314 | end; 315 | 316 | // Pinball 317 | if ema8 <= ema34 and 318 | ema34 <= sma50 and 319 | close[1] <= ema8 and 320 | last > ema8 and 321 | last > open and 322 | last > high[1] then begin 323 | Plot10("Pinball", "Pinball", iff(vPinballFlag[1] = 1, darkgreen, green)); 324 | vPinballFlag= 1; 325 | AlertLong = true; 326 | end 327 | else if ema8 >= ema34 and 328 | ema34 >= sma50 and 329 | close[1] >= ema8 and 330 | last < ema8 and 331 | last < open and 332 | last < low[1] then begin 333 | Plot10("Pinball", "Pinball", iff(vPinballFlag[1] = -1, darkred, red)); 334 | vPinballFlag= -1; 335 | AlertShort = true; 336 | end; 337 | 338 | if AlertLong then 339 | Alert("Long bounce on " + GetSymbolName); 340 | 341 | if AlertShort then 342 | Alert("Short bounce on " + GetSymbolName); 343 | -------------------------------------------------------------------------------- /Scanner/BL_$NetChg Period.txt: -------------------------------------------------------------------------------- 1 | 2 | { 3 | This code is to be used in the Scanner. It is designed 4 | to find the stocks that have the largest net move within 5 | the define Period of bars. It will also skip over any 6 | stocks that are below the defined average threshold. 7 | 8 | The Scanner should test for a non-zero value. You can 9 | set a desired minimum amount. 10 | } 11 | 12 | input: 13 | Period(8), 14 | AvgLength(20), 15 | MinAvgVol(10000); 16 | var: 17 | AvgVol(0), 18 | NetChg(0); 19 | 20 | if BarType >= 2 and BarType < 5 then { Daily, Weekly, or Monthly bars } 21 | AvgVol = AverageFC(Volume, AvgLength) 22 | else 23 | AvgVol = AverageFC(Ticks, AvgLength); 24 | 25 | if date = date[Period] and AvgVol > MinAvgVol then 26 | NetChg = MaxList(Last - lowestFC(low, Period), highestFC(high, Period) - Last) 27 | else 28 | NetChg = 0; 29 | 30 | Plot1(NetChg, "NetChg"); 31 | --------------------------------------------------------------------------------