ThinkScript: Three Line Break - ThinkOrSwim Programming | futures io social day trading
futures io futures trading

ThinkScript: Three Line Break
Updated: Views / Replies:5,579 / 0
Created: by StockJock 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

ThinkScript: Three Line Break

  #1 (permalink)
Trading for Profit
Chicago + Illinois/USA
Futures Experience: Beginner
Platform: ThinkOrSwim
Favorite Futures: Stock
StockJock's Avatar
Posts: 256 since Aug 2010
Thanks: 15 given, 149 received

ThinkScript: Three Line Break

I need help with the cloud function. This three line break indicator displays an upper and lower line that I would like to fill to make it look more like a regular three line break chart. The problem is filling the gap between the upper and lower lines. Using just the cloud function doesn't work properly; so there could be a way to use the cloud function together with the rec or the fold commands. Can anyone help me with this?

#  SJ_ThreeLineBreak
#  Original Code by Richard Houser
declare upper;
# Clear Chart
# Turn off volume on upper chart: Style > Settings > Equities > Show Volume (empty checkbox)
AssignPriceColor(CreateColor(10, 0, 78));
AssignBackgroundColor(CreateColor(10, 0, 78));
rec state = {default barOne, barTwo, barThree};
rec xHigh;
rec xLow;
rec xWhite;
switch ( state[1] ) {
  case barOne:
    state    = state.barTwo;
    xHigh    = high;
    xLow     = low;
    xWhite   = if close > open then yes else no;
  case barTwo:
    state = state.barThree;
    if high > xHigh[1] then {
      xHigh  = high;
      xLow   = xHigh[1];
      xWhite = yes;
    } else if low < xLow[1] then {
      xHigh  = xLow[1];
      xLow   = low;
      xWhite = no;
    } else {
      xHigh  = xHigh[1];
      xLow   = xLow[1];
      xWhite = xWhite[1];
  case barThree:
    state = state.barThree;
    if high > Max(xHigh[1],xHigh[2]) then {
      xHigh  = high;
      xLow   = xHigh[1];
      xWhite = yes;
    } else if low < Min(xLow[1],xLow[2]) then {
      xHigh  = xLow[1];
      xLow   = low;
      xWhite = no;
    } else {
      xHigh  = xHigh[1];
      xLow   = xLow[1];
      xWhite = xWhite[1];
DefineGlobalColor( "3LBH", Color.YELLOW );
DefineGlobalColor( "3LBL", Color.CYAN );
plot TLB_High  = if IsNaN(close) then Double.NaN else if xWhite then xHigh else xLow;
TLB_High.SetPaintingStrategy( PaintingStrategy.DASHES );
TLB_High.AssignValueColor( if xWhite then globalColor("3LBH") else globalColor("3LBL"));
plot TLB_Low = if IsNaN(close) then Double.NaN else if xWhite then xLow else xHigh;
TLB_Low.SetPaintingStrategy( PaintingStrategy.DASHES );
TLB_Low.AssignValueColor( if xWhite then globalColor("3LBH") else globalColor("3LBL"));
# AddCloud( TLB_High, TLB_Low, globalColor("3LBH"), globalColor("3LBL") );
plot P = close;
P.SetPaintingStrategy( PaintingStrategy.POINTS );

Reply With Quote
The following user says Thank You to StockJock for this post:


futures io > > > > > ThinkScript: Three Line Break

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
Better Line Break Charts gordo The Elite Circle 138 November 29th, 2016 02:30 AM
Back test line break charts mrticks NinjaTrader Programming 19 October 21st, 2013 03:20 PM
Range Bars as base type for Better Line Break? aligator Traders Hideout 4 September 25th, 2011 10:04 PM
Need clarification on Line Break charts jmjstrider The Elite Circle 10 May 6th, 2011 03:30 PM
Line break bars use meyer99 NinjaTrader 7 July 14th, 2010 08:33 AM

All times are GMT -4. The time now is 01:48 PM.

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-22 in 0.07 seconds with 19 queries on phoenix via your IP