diff --git a/Images/Beaker_Icon.jpg b/Images/Beaker_Icon.jpg new file mode 100644 index 0000000..6890974 Binary files /dev/null and b/Images/Beaker_Icon.jpg differ diff --git a/Images/Customizing.jpg b/Images/Customizing.jpg new file mode 100644 index 0000000..e7eb68c Binary files /dev/null and b/Images/Customizing.jpg differ diff --git a/Images/Gear.jpg b/Images/Gear.jpg new file mode 100644 index 0000000..d729ea3 Binary files /dev/null and b/Images/Gear.jpg differ diff --git a/Images/Open_Shared.jpg b/Images/Open_Shared.jpg new file mode 100644 index 0000000..64aae49 Binary files /dev/null and b/Images/Open_Shared.jpg differ diff --git a/Images/Steps_To_Apply.jpg b/Images/Steps_To_Apply.jpg new file mode 100644 index 0000000..d0c1765 Binary files /dev/null and b/Images/Steps_To_Apply.jpg differ diff --git a/Images/Steps_To_Apply2.jpg b/Images/Steps_To_Apply2.jpg new file mode 100644 index 0000000..6c244c5 Binary files /dev/null and b/Images/Steps_To_Apply2.jpg differ diff --git a/Images/Trend_Detected.jpg b/Images/Trend_Detected.jpg new file mode 100644 index 0000000..09670ff Binary files /dev/null and b/Images/Trend_Detected.jpg differ diff --git a/README.md b/README.md index 9e93161..e08d023 100644 --- a/README.md +++ b/README.md @@ -1 +1,43 @@ -# TOS_Trend_Indicator \ No newline at end of file +# Trend Indicator + +I wrote this for Thinkorswim platform. This script can be used using this script code: https://tos.mx/q6sj9Bn + +## Here is how To Use + +To import the script code: +Go to top right of Thinkorswim platform window and click on the Gear Setup Icon tab. +A drop-down menu will appear. From this menu select Open share item... +This will open the Open Share Item window +![Image of Open Share Item](Images/Open_Shared.jpg) +From here you will enter the script code to install the Trend Indicator script. + +Once imported into your Thinkorswim platform go to Edit Studies (Beaker Icon) from any chart window. +![Image of Beaker Icon](Images/Beaker_Icon.jpg) +Once you click on the Edit Studies (Beaker Icon) this will open up the Edit Studies and Strategies window + +From Here you can add Trend_Indicator to your chart. +![Image of Edit Studies](Images/Steps_To_Apply.jpg) + +1. This is where you can type in Trend_Indicator to look for it through hundreds of different Studies. +2. Trend_Indicator will be displayed in this area if you had imported it correctly. Highlight by clicking on Trend_Indicator in this area. +3. Now to add to chart you can click on Add selected. +4. Once added to your chart it will appear in Price area. +5. Clicking on the gear icon will access the customization of Trend_Indicator to make your trend detection more accurate. + +![Image of Customizing](Images/Customizing.jpg) +This shows where to adjust the Trend Time Frame. +Set this for the length of time you want to check for a trend. + +Be aware this will be based off your time of the Chart being used. Example: 1D 1M chart with trend length time frame at 20 would give you the trend for the past 20 minutes. + +1. Displays the window where you can enter your time frame to detect your trend in your chart. +2. After entering your detection time, click on the ok tab to exit the Customizing window. + +![Image of Edit Studies](Images/Steps_To_Apply2.jpg) +Once you set your trend length time frame for your chart. You will need to: + +1. Press Apply to add changes to your chart. +2. Press Ok to exit the Edit Studies and Strategies window. + +![Image of Trend detected](Images/Trend_Detected.jpg) +Now in the top left of your chart window the trend that the script had detected will be displayed. **Remember this is based off the trend length time frame and your chart time.** diff --git a/trend_Indicator.ts b/trend_Indicator.ts new file mode 100644 index 0000000..f232099 --- /dev/null +++ b/trend_Indicator.ts @@ -0,0 +1,16 @@ +# +# Author: TechRancher +# Date: 03 / 2021 +# Follow: HTTPS://www.github.com/TechRancher +# + +# User Input +# Set this for the length of time you want to check for a trend.Be # aware this will be based of your time of Charts.Example: 1D 1M # chart with trend length time frame at 20 would give me the trend # for the past 20 minutes. + +input trendLengthTimeFrame = 20; + + +# Trend Indicator +# This will display on your chart the trend as a label. + +AddLabel(yes, if IsAscending(close, trendLengthTimeFrame) then "Uptrend" else "Downtrend"); \ No newline at end of file