Flipit indicator For ThinkOrSwim

Norm6257

New member
VIP
The Flipit indicator is available on several other platforms (e.g. MetaTrader, SmartTrader) but I have not been able to find it on ToS. It is an indicator something like the ToS ATRTrailingStop but certainly shows different results. Does anyone know if there is a script available for Flipit, or maybe it is called something different in ToS?
https://www.mql5.com/en/job/29494
https://fxcodebase.com/code/viewtopic.php?f=17&t=63478
 
Last edited by a moderator:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

The Flipit indicator is available on several other platforms (e.g. MetaTrader, SmartTrader) but I have not been able to find it on ToS. It is an indicator something like the ToS ATRTrailingStop but certainly shows different results. Does anyone know if there is a script available for Flipit, or maybe it is called something different in ToS?
https://www.mql5.com/en/job/29494
https://fxcodebase.com/code/viewtopic.php?f=17&t=63478
Code:
Top = Sum(High, Period) / Period;
Bottom = Sum(Low, Period) / Period;
Average=(Top+Bottom)/2;
Average>Close
Green
Average< Close
Red
Code:
Declare Lower;
input period = 10;

def T = Sum(High, Period) / Period;
def B = Sum(Low, Period) / Period;
def A=(T+B)/2;
Plot Ribbon = if IsNaN(Close) then Double.NaN else 0;;
Ribbon.assignValueColor( if A < Close then Color.Green else Color.Red);

Your colors were backward!
 
Code:
Declare Lower;
input period = 10;

def T = Sum(High, Period) / Period;
def B = Sum(Low, Period) / Period;
def A=(T+B)/2;
Plot Ribbon = if IsNaN(Close) then Double.NaN else 0;;
Ribbon.assignValueColor( if A < Close then Color.Green else Color.Red);

Your colors were backward!
Awesome... thank you! This will get me started. My objective is to display it as lines on the price chart with it "flipping" like the "ATRTrailingStop" indicator does.
 
Awesome... thank you! This will get me started. My objective is to display it as lines on the price chart with it "flipping" like the "ATRTrailingStop" indicator does.
You might be interested in this version
Code:
Declare Lower;
input Period1 = 3;
input Period2 = 5;
input Period3 = 8;
input Period4 = 10;
input Period5 = 12;
input Period6 = 15;
input Period7 = 30;
input Period8 = 35;
input Period9 = 40;
input Period10 = 45;
input Period11 = 50;
input Period12 = 60;
input Dotsize = 3;
input Paintbars =0;
def T1 = Sum(High, Period1) / Period1;
def B1 = Sum(Low, Period1) / Period1;
def A1=(T1+B1)/2;
def T2 = Sum(High, Period2) / Period2;
def B2 = Sum(Low, Period2) / Period2;
def A2=(T2+B2)/2;
def T3 = Sum(High, Period3) / Period3;
def B3 = Sum(Low, Period3) / Period3;
def A3=(T3+B3)/2;
def T4 = Sum(High, Period4) / Period4;
def B4 = Sum(Low, Period4) / Period4;
def A4=(T4+B4)/2;
def T5 = Sum(High, Period5) / Period5;
def B5 = Sum(Low, Period5) / Period5;
def A5=(T5+B5)/2;
def T6 = Sum(High, Period6) / Period6;
def B6 = Sum(Low, Period6) / Period6;
def A6=(T6+B6)/2;
def T7 = Sum(High, Period7) / Period7;
def B7 = Sum(Low, Period7) / Period7;
def A7=(T7+B7)/2;
def T8 = Sum(High, Period8) / Period8;
def B8 = Sum(Low, Period8) / Period8;
def A8=(T8+B8)/2;
def T9 = Sum(High, Period9) / Period9;
def B9 = Sum(Low, Period9) / Period9;
def A9=(T9+B9)/2;
def T10 = Sum(High, Period10) / Period10;
def B10 = Sum(Low, Period10) / Period10;
def A10=(T10+B10)/2;
def T11 = Sum(High, Period11) / Period11;
def B11 = Sum(Low, Period11) / Period11;
def A11=(T11+B11)/2;
def T12 = Sum(High, Period12) / Period12;
def B12 = Sum(Low, Period12) / Period12;
def A12=(T12+B12)/2;
plot A1_Dot = if IsNaN(Close) then Double.NaN else 1;
A1_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
A1_Dot.SetLineWeight(DotSize);
A1_Dot.AssignValueColor(if A1 < Close then Color.Cyan else Color.Magenta);
plot A2_Dot = if IsNaN(Close) then Double.NaN else 2;
A2_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
A2_Dot.SetLineWeight(DotSize);
A2_Dot.AssignValueColor(if A2 < Close  then Color.Cyan else Color.Magenta);
plot A3_Dot = if IsNaN(Close) then Double.NaN else 3;
A3_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
A3_Dot.SetLineWeight(DotSize);
A3_Dot.AssignValueColor(if A3 < Close then Color.Cyan else Color.Magenta);
plot A4_Dot = if IsNaN(Close) then Double.NaN else 4;
A4_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
A4_Dot.SetLineWeight(DotSize);
A4_Dot.AssignValueColor(if A4 < Close then Color.Cyan else Color.Magenta);
plot A5_Dot = if IsNaN(Close) then Double.NaN else 5;
A5_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
A5_Dot.SetLineWeight(DotSize);
A5_Dot.AssignValueColor(if A5 < Close then Color.Cyan else Color.Magenta);
plot A6_Dot = if IsNaN(Close) then Double.NaN else 6;
A6_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
A6_Dot.SetLineWeight(DotSize);
A6_Dot.AssignValueColor(if A6 < Close then Color.Cyan else Color.Magenta);
plot B7_Dot = if IsNaN(Close) then Double.NaN else 7;
B7_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
B7_Dot.SetLineWeight(DotSize);
B7_Dot.AssignValueColor(if A7 < Close then Color.Blue else Color.Red);
plot B8_Dot = if IsNaN(Close) then Double.NaN else 8;
B8_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
B8_Dot.SetLineWeight(DotSize);
B8_Dot.AssignValueColor(if A8 < Close then Color.Blue else Color.Red);
plot B9_Dot = if IsNaN(Close) then Double.NaN else 9;
B9_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
B9_Dot.SetLineWeight(DotSize);
B9_Dot.AssignValueColor(if A9 < Close then Color.Blue else Color.Red);
plot B10_Dot = if IsNaN(Close) then Double.NaN else 10;
B10_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
B10_Dot.SetLineWeight(DotSize);
B10_Dot.AssignValueColor(if A10 < Close then Color.Blue else Color.Red);
plot B11_Dot = if IsNaN(Close) then Double.NaN else 11;
B11_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
B11_Dot.SetLineWeight(DotSize);
B11_Dot.AssignValueColor(if A11 < Close then Color.Blue else Color.Red);
plot B12_Dot = if IsNaN(Close) then Double.NaN else 12;
B12_Dot.SetPaintingStrategy(PaintingStrategy.TRIANGLES);
B12_Dot.SetLineWeight(DotSize);
B12_Dot.AssignValueColor(if A12 < Close then Color.Blue else Color.Red);
AssignPriceColor(if paintbars == 1 and A1 < Close then Color.Cyan else if paintbars == 1 and A1 > Close then Color.Magenta else if paintbars == 2 and A2 < Close then Color.Cyan else if paintbars == 2 and A2 > Close then Color.Magenta else if paintbars == 3 and A3 < Close then Color.Cyan else if paintbars == 3 and A3 > Close then Color.Magenta else if paintbars == 4 and A4 < Close then Color.Cyan else if paintbars == 4 and A4 > Close then Color.Magenta else
if paintbars == 5 and A5 < Close then Color.Cyan else if paintbars == 5 and A5 > Close then Color.Magenta else if paintbars == 6 and A6 < Close then Color.Cyan else if paintbars == 6 and A6 > Close then Color.Magenta else if paintbars == 7 and A7 < Close then Color.Blue else if paintbars == 7 and A7 > Close then Color.Red else if paintbars == 8 and A8 < Close then Color.Blue else if paintbars == 8 and A8 > Close then Color.Red else
if paintbars == 9 and A9 < Close then Color.Blue else if paintbars == 9 and A9 > Close then Color.Red else if paintbars == 10 and A10 < Close then Color.Blue else if paintbars == 10 and A10 > Close then Color.Red else if paintbars == 11 and A11 < Close then Color.Blue else if paintbars == 11 and A11 > Close then Color.Red else if paintbars == 12 and A12 < Close  then Color.Blue else if paintbars == 12 and A12 > Close then Color.Red else color.Current);
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
538 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

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.

How do I get started?

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.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top