First Script Help - ThinkOrSwim | futures io social day trading
futures io futures trading

First Script Help
Updated: Views / Replies:454 / 0
Created: by samvent Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Thread Tools Search this Thread

First Script Help

  #1 (permalink)
Trading Apprentice
Normal Il USA
Futures Experience: Beginner
Platform: ThinkorSwim
Favorite Futures: Bond Futures
Posts: 1 since Jul 2016
Thanks: 0 given, 0 received

First Script Help

I am attempting to write my first script and need some help. A simple indicator to follow trend changes.
I want to adjust the timeframe independent of the chart, but can't seem to figure out how to add the time period to my plot. Any help would be appreciated.

declare lower;
input TimeFrame1 = {default "5 min", "10 min", "15 min", "20 min"};
def Aggregation1;
def range = (hl2[5] + hl2[4] + hl2[3] + hl2[2] + hl2[1] + hl2) / 6;
def uptrend = (if close > range then 1 else 0);
def downtrend = if close <= range then 1 else 0;

switch (TimeFrame1) {
case "5 min":
Aggregation1 = AggregationPeriod.FIVE_MIN;
case "10 min":
Aggregation1 = AggregationPeriod.TEN_MIN;
case "15 min":
Aggregation1 = AggregationPeriod.FIFTEEN_MIN;
case "20 min":
Aggregation1 = AggregationPeriod.TWENTY_MIN;

def timeFrame = GetAggregationPeriod();
def testTimeFrames = if timeFrame < Aggregation1 then yes else no;
AddLabel(yes, if testTimeFrames then "Time Frames Are Correct" else "Time Frames Are Wrong", if testTimeFrames then Color.GREEN else Color.RED);

plot Trend1 = if uptrend then 1 else Double.NaN;
plot Trend2 = if downTrend then 1 else Double.NaN;

Reply With Quote


futures io > > > > First Script Help

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

Wyckoff Hunting for Great Risk/Reward Ratio w/Gary Fullett

Elite only

Digging into the Details of iSystems w/Stage 5 & iSystems

Jun 5

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with a think script problem johnzhou20 ThinkOrSwim 0 November 29th, 2015 05:53 AM
Can I get the script of this Indicator? khalid alshalan ThinkOrSwim 8 April 6th, 2014 02:19 PM
Option Script bobp ThinkOrSwim Programming 2 August 7th, 2012 06:42 PM
Need little help with a Ninjatrader script raindrop NinjaTrader Programming 9 April 20th, 2011 10:35 PM
script idea sharky NinjaTrader Programming 64 November 15th, 2009 05:05 PM

All times are GMT -4. The time now is 03:27 AM.

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
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.
no new posts
Page generated 2018-05-23 in 0.06 seconds with 19 queries on phoenix via your IP