@jan_angel Take a look at this article https://www.investopedia.com/stock-...ations-poised-breakout-all-oxy-line-nuan.aspx
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
How do you use this indicator?
It's specfied in the code. Basically high number bad , no trade . Low number good, trade. Works long & short.
I use this indicator all the time and just like you had used the ADX to identify trends/ending trends and chop. I still use the ADX but beginning to use the Choppiness Index and other FE variations because it is quicker than the ADX and nowhere near as laggy as the ADXThis is actually looking really good. Has anybody else tried it yet? I have tried using ADX in the past but too many good moves were missed, so happy to have this alt.
# Sideways Indicator
# Original Code developed by WalkingBallista
# Concept and Idea by BenTen at useThinkScript.com
# Identify choppy market. Can also be used to find consolidation/breakout patterns.
# Version 1.0 (read changelog in the forum)
input length = 14;
input averageType = AverageType.WILDERS;
input price = close;
input consolidation_range = 5;
def hiDiff = high - high[1];
def loDiff = low[1] - low;
def plusDM = if hiDiff > loDiff and hiDiff > 0 then hiDiff else 0;
def minusDM = if loDiff > hiDiff and loDiff > 0 then loDiff else 0;
def ATR = MovingAverage(averageType, TrueRange(high, close, low), length);
def "DI+" = 100 * MovingAverage(averageType, plusDM, length) / ATR;
def "DI-" = 100 * MovingAverage(averageType, minusDM, length) / ATR;
def range = AbsValue(AbsValue("DI+")-AbsValue("DI-"));
AssignPriceColor(if range < consolidation_range then Color.Yellow else Color.Current);
Yes that is how I set-up the WL. Just wanted to confirm it was the correct way. Thx@Rosalyn See comment #28
#include <MovingAverages.mqh>
#property indicator_buffers 3
#property indicator_plots 2
#property indicator_minimum 0
#property indicator_maximum 100
#property indicator_level1 60
#property indicator_level2 50
#property indicator_level3 40
#property indicator_levelcolor clrPurple
//-------------------------------------------------------------------------
#property indicator_type1 DRAW_LINE
#property indicator_color1 clrBlue
#property indicator_width1 2
#property indicator_label1 "Signal"
//-------------------------------------------------------------------------
#property indicator_type2 DRAW_COLOR_HISTOGRAM
#property indicator_color2 clrRed,clrYellow,clrGreen,
#property indicator_width2 2
#property indicator_label2 "Hist"
//------------------------------------------------------------------------
input int N_Period = 60; //CMI Period
input int MA_Period = 10; //MA Period
//-------------------------------------------------------------------------
double HistBuffer[];
double ColorBuffer[];
double MABuffer[];
int ColorInd=0;
//+-------------------------------------------------------------------------
//| Custom indicator initialization function |
//+-------------------------------------------------------------------------
int OnInit()
{
//---
SetIndexBuffer(0,MABuffer,INDICATOR_DATA);
SetIndexBuffer(1,HistBuffer,INDICATOR_DATA);
SetIndexBuffer(2,ColorBuffer,INDICATOR_COLOR_INDEX);
//---
PlotIndexSetDouble(0,PLOT_EMPTY_VALUE,0.0);
PlotIndexSetDouble(1,PLOT_EMPTY_VALUE,0.0);
//---
ArraySetAsSeries(HistBuffer,true);
ArraySetAsSeries(ColorBuffer,true);
ArraySetAsSeries(MABuffer,true);
IndicatorSetString(INDICATOR_SHORTNAME,"(CMI"+", Period = "+string(N_Period)+", MA = "+string(MA_Period)+" )");
IndicatorSetInteger(INDICATOR_DIGITS,_Digits+1);
return(0);
}
double Delta_hl,Delta_Close;
//+-------------------------------------------------------------------------+
//| Custom indicator iteration function |
//+-------------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
int offset=N_Period+1;
if(rates_total<offset) return(0);
ArraySetAsSeries(high,true);
ArraySetAsSeries(low,true);
ArraySetAsSeries(close,true);
int start;
if(prev_calculated<rates_total || prev_calculated<=0)
{
for(int i=rates_total-1; i>=0; i--)
{
HistBuffer[I]=0.0;
}
start=rates_total-offset;
}
else start=rates_total-prev_calculated;
// ---------------------------
for(int i=start; i>=0; i--)
{
Delta_hl=high[ArrayMaximum(high,i,N_Period)]-low[ArrayMinimum(low,i,N_Period)];;
Delta_Close=close[I]-close[i+N_Period];
//----
if(Delta_hl==0)
HistBuffer[I]=0;
else
HistBuffer[I]=MathAbs(Delta_Close)/Delta_hl*100;
if(Delta_Close>0)
{
if(ColorInd<2) ColorInd++;
ColorBuffer[I]=ColorInd;
}
else if(Delta_Close<0)
{
if(ColorInd>0) ColorInd--;
ColorBuffer[I]=ColorInd;
}
else ColorBuffer[I]=1;
}
SimpleMAOnBuffer(rates_total,prev_calculated,N_Period,MA_Period,HistBuffer,MABuffer);
return(rates_total);
}[/I][/I][/I][/I][/I][/I][/I]
Hi,
I would like to know your ideas on the best way to scan for stocks that had no to very little price movement in the last week/month. Thanks.
Let's say that I want to see stocks that traded within 10% of their price in the last week/month. The default scans for % Change Gainers and % Change Losers gives me only stocks that moved today.You would need to define "very little"... Is that a percentage or value...??? The scanner has default scans for % Change Gainers and % Change Losers, amongst others...
//Created by Trading Rush
// © Trading Rush
//@version=4
study(title="Trading Rush Moving Average", shorttitle="TR EMA", overlay=true, resolution="")
len = 200
src = close
ema1 = ema(src, len)
maColor = if(close[5] > ema1[5] and close[10] > ema1[10] and close[15] > ema1[15] and close[20] > ema1[20] and close[30] > ema1[30] and close[40] > ema1[40] and close[50] > ema1[50] and close > ema1)
[URL='http://color.green/']color.green[/URL]
else if(close[5] < ema1[5] and close[10] < ema1[10] and close[15] < ema1[15] and close[20] < ema1[20] and close[30] < ema1[30] and close[40] < ema1[40] and close[50] < ema1[50] and close < ema1)
[URL='http://color.red/']color.red[/URL]
else
[URL='https://color.new/']color.new[/URL](color.white, 100)
plot(ema1, title="TR EMA", color=maColor, linewidth=4)
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
ARSI - Adaptive Relative Strength Index for ThinkorSwim | Indicators | 15 | ||
C | True Strength Index Indicator for ThinkorSwim | Indicators | 35 | |
B | "Threaded Needle Cross" (Didi Index) For ThinkOrSwim | Indicators | 14 | |
LazyBear's Intraday Momentum Index for Thinkorswim | Indicators | 7 | ||
S | Smart Money Index (SMI) Indicator for ThinkorSwim | Indicators | 29 |
Start a new thread and receive assistance from our community.
useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.
We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.
If you are new, or just looking for guidance, here are some helpful links to get you started.