NexusFi: Find Your Edge


Home Menu

 





Thinkscript library, popular scripts and studies


Discussion in ThinkOrSwim

Updated
      Top Posters
    1. looks_one lukeskywalker1 with 22 posts (13 thanks)
    2. looks_two wldman with 3 posts (0 thanks)
    3. looks_3 casey44 with 1 posts (1 thanks)
    4. looks_4 bobwest with 1 posts (1 thanks)
    1. trending_up 33,281 views
    2. thumb_up 15 thanks given
    3. group 17 followers
    1. forum 28 posts
    2. attach_file 18 attachments




 
Search this Thread

Thinkscript library, popular scripts and studies

  #11 (permalink)
 
lukeskywalker1's Avatar
 lukeskywalker1 
Los Angeles (CA)
 
Experience: Master
Platform: ThinkOrSwim
Trading: Currency Future, Stocks
Posts: 34 since Apr 2019
Thanks Given: 1
Thanks Received: 40

Double Inside Bar Indicator*

Candlestick pattern indicator Double Inside Bar shows when the "inside bar" pattern is drawn on the chart 2 times in a row. The signal is very rare as in the "Double Outside bar" Indicator.

⚙First, import indicator by using <Edit Studies> menu. It will appear on the list, but you cannot see it right away.
You need to enter Studies – User Defined. Click on the necessary indicator and add - "Add Study". There are no special settings for this indicator.
________________
HTML Code:
#thinkscript indicator: Double_Inside_bar.
#Shows the pattern "Double Inside bar"
#by thetrader.top

def bSignalDown = high[2]>high[1] and high[1]>high and low[2]<low[1] and low[1]<low;
def bSignalUp = 0;
plot down = if bSignalDown then high else double.NaN;
plot up = if bSignalUp then high else double.NaN;
up.SetPaintingStrategy(paintingStrategy.BOOLEAN_ARROW_up);
down.SetPaintingStrategy(paintingStrategy.BOOLEAN_ARROW_down);
up.setDefaultColor(color.LIGHT_green);
down.setDefaultColor(color.LIGHT_red);

Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
About a successful futures trader who didnt know anythin …
Psychology and Money Management
How to apply profiles
Traders Hideout
ZombieSqueeze
Platforms and Indicators
REcommedations for programming help
Sierra Chart
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
  #12 (permalink)
 
lukeskywalker1's Avatar
 lukeskywalker1 
Los Angeles (CA)
 
Experience: Master
Platform: ThinkOrSwim
Trading: Currency Future, Stocks
Posts: 34 since Apr 2019
Thanks Given: 1
Thanks Received: 40

Three-Bar Reversal Indicator

This indicator indicates the place of three bar reversal with arrows on the chart📈. The formation is quite specific. Not many people know about it.

⚙Let's place the indicator according to the "three bar reversal" pattern. We'll choose a 5-minute timeframe for that. Import indicator by using <Edit Studies> menu. It will appear on the list. You need to enter Studies – User Defined. Click on the necessary indicator and add - "Add Study".
________________
HTML Code:
#thinkscript indicator: Three_Bar_Reversal.
#Shows the pattern "Three Bar Reversal"
#by thetrader.top

def bSignalDown = open[2]<close[2] and low[1]>low[2] and low[1]<high[2] and high[1]>high[2] and high<high[1] and close[1]<low[1];
def bSignalUp = open[2]>close[2] and low[1]<low[2] and low[2]<high[1] and low[1]<low[2] and low>low[1] and low<high[1] and close>high[1];
plot down = if bSignalDown then high else double.NaN;
plot up = if bSignalUp then high else double.NaN;
up.SetPaintingStrategy(paintingStrategy.BOOLEAN_ARROW_up);
down.SetPaintingStrategy(paintingStrategy.BOOLEAN_ARROW_down);
up.setDefaultColor(color.LIGHT_green);
down.setDefaultColor(color.LIGHT_red);

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #13 (permalink)
 
lukeskywalker1's Avatar
 lukeskywalker1 
Los Angeles (CA)
 
Experience: Master
Platform: ThinkOrSwim
Trading: Currency Future, Stocks
Posts: 34 since Apr 2019
Thanks Given: 1
Thanks Received: 40


Double-Bar Indicator

📈Double-Bar Indicator shows bars with similar bases using the arrows on the chart. ⚙First, import indicator by using <Edit Studies> menu. It will appear on the list, but you cannot see it right away.
You need to enter Studies – User Defined. Click on the necessary indicator and add - "Add Study". There are no special settings for this indicator.
________________
HTML Code:
#thinkscript indicator: Double_Bars.
#Shows the pattern "Double Bars"
#by thetrader.top

def bSignalDown =close[1]>open[1] and high[1]==high and open>close and close<high[1];
def bSignalUp = open[1]>close[1] and low[1]==low and open<close and close>high[1];
plot down = if bSignalDown then high else double.NaN;
plot up = if bSignalUp then high else double.NaN;
up.SetPaintingStrategy(paintingStrategy.BOOLEAN_ARROW_up);
down.SetPaintingStrategy(paintingStrategy.BOOLEAN_ARROW_down);
up.setDefaultColor(color.LIGHT_green);
down.setDefaultColor(color.LIGHT_red);

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #14 (permalink)
 
lukeskywalker1's Avatar
 lukeskywalker1 
Los Angeles (CA)
 
Experience: Master
Platform: ThinkOrSwim
Trading: Currency Future, Stocks
Posts: 34 since Apr 2019
Thanks Given: 1
Thanks Received: 40

Dinamic Stock #Indicator

📈The indicator will show candlesticks larger than the daily ATR. Period ATR=14, present ATR=10%. 10% excess daily ATR will be highlighted in color. If shares go up (3 consecutive candlesticks) they are colored green on the chart, if down - red. The indicator can be used to find some movement (dinamic).
________
#thinkscript indicator: Dinamic_Stock.
#When three candles in a row close above % of ATR
# by thetrader.top

HTML Code:
input period_ATR = 14;
input Precent_ATR = 10; #рывок свечи в % от АТR
def agg = getAggregationPeriod();
def iATR = round((Average(high(period=agg)[0], period_ATR )-Average(low(period=agg)[0], period_ATR )),2);
def iDiff = Precent_ATR*iATR/100;
def BU0 = close[0]-close[1]>=iDiff and close[1]-close[2]>=iDiff and close[2]-close[3]>=iDiff;
def BU1 = close[-1]-close[0]>=iDiff and close[0]-close[1]>=iDiff and close[1]-close[2]>=iDiff;
def BU2 = close[-2]-close[-1]>=iDiff and close[-1]-close[0]>=iDiff and close[0]-close[1]>=iDiff;
def BD0 = close[0]-close[1]<=-iDiff and close[1]-close[2]<=-iDiff and close[2]-close[3]<=-iDiff;
def BD1 = close[-1]-close[0]<=-iDiff and close[0]-close[1]<=-iDiff and close[1]-close[2]<=-iDiff;
def BD2 = close[-2]-close[-1]<=-iDiff and close[-1]-close[0]<=-iDiff and close[0]-close[1]<=-iDiff;
def bSignalUp = BU0+BU1+BU2;
def bSignalDown = BD0+BD1+BD2;
AssignPriceColor( if bSignalUp then color.green else if bSignalDown then color.red else color.gray);

Attached Thumbnails
Click image for larger version

Name:	DinamicStocks.jpg
Views:	551
Size:	223.5 KB
ID:	294363  
Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #15 (permalink)
FireFox21
Birmingham, Alabama USA
 
Posts: 2 since Apr 2020
Thanks Given: 0
Thanks Received: 0

Hello to All,
I am new to trading as well as to this site. Saw a lot of helpful and smart people here. So I joined to get some help on thinkorswim. I am currently using this platform but it is really complicated. I am trying to create a scan where I can scan 3 or more moving averages at the same time and get an alert before that happens. So far unsuccessful. Can anyone please help me in creating a think script for 3 simple moving averages( 20,50,200 SMAs) crossing close to each other to the upside at single point and get an alert right when it is happening. Please see this screenshot and the point where it is splitting in an upward movement. Any help will be highly appreciated. Thanks in advance.


2020-04-13-TOS_CHARTS


2020-04-13-TOS_CHART

Reply With Quote
  #16 (permalink)
 
lukeskywalker1's Avatar
 lukeskywalker1 
Los Angeles (CA)
 
Experience: Master
Platform: ThinkOrSwim
Trading: Currency Future, Stocks
Posts: 34 since Apr 2019
Thanks Given: 1
Thanks Received: 40

Chart Background Indicator*

📈 This indicator will help to put a line on the chart for one more share and we'll see their interaction. Usually, this indicator is used when you want to see the share's attitude to the market.
⚙ Automatically, the indicator is set at the bottom, but it is inconvenient, so in the settings press "Move Up" and "Apply", after which the indicator will be drawn directly on the chart. In "Inputs" parameter "Symbol" can be changed, there is also a possibility to adjust the line by type and thickness. If you choose "Left Axis", the price scale of this market will be displayed on the left side of the screen.
________
HTML Code:
#thinkscript indicator: Chart_Background.
#Set the chart of any symbol in the background
#by thetrader.top
declare lower;
input symbol = {default “/ES”, "SPY"}; #type in the desired character
plot Line = close (symbol);
Line.SetDefaultColor (Color.GRAY);

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #17 (permalink)
 
lukeskywalker1's Avatar
 lukeskywalker1 
Los Angeles (CA)
 
Experience: Master
Platform: ThinkOrSwim
Trading: Currency Future, Stocks
Posts: 34 since Apr 2019
Thanks Given: 1
Thanks Received: 40


FireFox21 View Post
Hello to All,
I am new to trading as well as to this site. Saw a lot of helpful and smart people here. So I joined to get some help on thinkorswim. I am currently using this platform but it is really complicated. I am trying to create a scan where I can scan 3 or more moving averages at the same time and get an alert before that happens. So far unsuccessful. Can anyone please help me in creating a think script for 3 simple moving averages( 20,50,200 SMAs) crossing close to each other to the upside at single point and get an alert right when it is happening. Please see this screenshot and the point where it is splitting in an upward movement. Any help will be highly appreciated. Thanks in advance.


2020-04-13-TOS_CHARTS


2020-04-13-TOS_CHART

Now problem, will help you tomorrow

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #18 (permalink)
 
lukeskywalker1's Avatar
 lukeskywalker1 
Los Angeles (CA)
 
Experience: Master
Platform: ThinkOrSwim
Trading: Currency Future, Stocks
Posts: 34 since Apr 2019
Thanks Given: 1
Thanks Received: 40


FireFox21 View Post
Hello to All,
I am new to trading as well as to this site. Saw a lot of helpful and smart people here. So I joined to get some help on thinkorswim. I am currently using this platform but it is really complicated. I am trying to create a scan where I can scan 3 or more moving averages at the same time and get an alert before that happens. So far unsuccessful. Can anyone please help me in creating a think script for 3 simple moving averages( 20,50,200 SMAs) crossing close to each other to the upside at single point and get an alert right when it is happening. Please see this screenshot and the point where it is splitting in an upward movement. Any help will be highly appreciated. Thanks in advance.


2020-04-13-TOS_CHARTS


2020-04-13-TOS_CHART

Try this script for scan

 
Code
def SMA1 = MovingAverage (averageType.SIMPLE,close,20);
def SMA2 = MovingAverage (averageType.SIMPLE,close,50);
def SMA3 = MovingAverage (averageType.SIMPLE,close,200);

def Cros1 =  crosses (SMA1,SMA2,crossingDirection.ANY);
def Cros2 = crosses (SMA2,SMA3,crossingDirection.ANY);


plot signal = Cros1 AND Cros2;

Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #19 (permalink)
 
lukeskywalker1's Avatar
 lukeskywalker1 
Los Angeles (CA)
 
Experience: Master
Platform: ThinkOrSwim
Trading: Currency Future, Stocks
Posts: 34 since Apr 2019
Thanks Given: 1
Thanks Received: 40

Bars Color Indicator

The indicator will draw a gray candles of the time when you think you do not need to trade. 📈

⚙Inputs: select the time (start time and end time). For example, from 9.30-10.30 a.m. we do not want to trade, from 12.00-1.00 p.m. at lunch and from 3:00-4:00 p.m. at the end of the session. Apply. The specified time on the chart will be highlighted in gray.
It is possible to leave one period as you like.
________
HTML Code:
#thinkscript indicator: Bars_Color.
#gray out bars on a chart, while the trader is prohibited from trading
#by thetrader.top
input Start_Time1 = 0930;
input End_Time1 = 1030;
input Start_Time2 = 1200;
input End_Time2 = 1300;
input Start_Time3 = 1500;
input End_Time3 = 1600;
def Open1 = SecondsTillTime(Start_Time1) <= 0;
def Close1 = SecondsTillTime(End_Time1) <= 0;
def Open2 = SecondsTillTime(Start_Time2) <= 0;
def Close2 = SecondsTillTime(End_Time2) <= 0;
def Open3 = SecondsTillTime(Start_Time3) <= 0;
def Close3 = SecondsTillTime(End_Time3) <= 0;
def Off_Time = Open1 and !Close1 or Open2 and !Close2 or Open3 and !Close3;
AssignPriceColor( if Off_Time then Color.GRAY else Color.CURRENT);

Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #20 (permalink)
 
lukeskywalker1's Avatar
 lukeskywalker1 
Los Angeles (CA)
 
Experience: Master
Platform: ThinkOrSwim
Trading: Currency Future, Stocks
Posts: 34 since Apr 2019
Thanks Given: 1
Thanks Received: 40


Сandlestick Pattern Indicator "Overlapping Bodies"

📈The indicator shows when the "Overlapping Bodies" formation is formed. It shows with the arrows the candlestick pattern that is formed on the chart.
⚙The signals are divided into buy and sell. The arrows are adjustable (color, size, etc.).
________
HTML Code:
#thinkscript indicator: Body_overlapping.
#It shows a pattern "Body overlapping"
#by thetrader.top
def bSignalUp = open[1]<close[1] and open>close[1] and close<open[1];
def bSignalDown = open[1] > close[1] and open < close[1] and close > open[1];
plot up = if bSignalUp  then high else Double.NaN;
plot down = if bSignalDown then high else Double.NaN;
up.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
down.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
up.SetDefaultColor(Color.LIGHT_RED);
down.SetDefaultColor(Color.LIGHT_GREEN);

Visit my NexusFi Trade Journal Started this thread Reply With Quote




Last Updated on September 6, 2020


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts