blackFLAG FTS - SwingArm Trend Indicator using ATRTrailing Stop and Fibonacci Retracements

Status
Not open for further replies.
By the way, I checked against your screenshot watchlist, its different from mine. Did you get the correct code?
For e.g. ORMP was highlighted in my code but not yours.

nxRJVw1.png


OZvy1HZ.png
 

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

@fjr1300 How do I set up an alert to trigger when the bubbles"buy support", or "buy confirmed", Or "support 1" or "support 2" or "support 3" is triggered?:unsure: Im trying to still trade while at work and this would help a ton. Also the mobile version doesn't look like the mobile version in the video I must be doing something wrong. Thanks in advance
 
Last edited:
@fjr1300 How do I set up an alert to trigger when the bubbles"buy support", or "buy confirmed", Or "support 1" or "support 2" or "support 3" is triggered?:unsure: Im trying to still trade while at work and this would help a ton. Also the mobile version doesn't look like the mobile version in the video I must be doing something wrong. Thanks in advance

Trading futures from mobile is a tough one. I will not do that at the moment. In my view, one must be able to be in the cockpit to fly the airplane. Significant improvements must be done to mobile to safely trade futures with technicals in mind. The reason that you must be able to review multiple timeframe swingarms is that there are alerts that are false positives. You can filter those out by reviewing the swingarms. As of now, the improvements to alerts are work in process.
 
@fjr1300 How do I set up an alert to trigger when the bubbles"buy support", or "buy confirmed", Or "support 1" or "support 2" or "support 3" is triggered?:unsure: Im trying to still trade while at work and this would help a ton. Also the mobile version doesn't look like the mobile version in the video I must be doing something wrong. Thanks in advance

Please provide me a link to the mobile video you are referring to.
 
If I would like to get in early at support before thswingarm e can I create an alert for the support bubble aswell

You must learn to understand swingarms first. They already provide you the buy / sell zones. If a 4 hour chart has a brand new break up for example, within a day or two, you will have clear entry targets (zone 3 or 4) which is very likely will be tested prior to a trend continuation. In that case, place waiting for buy orders at those levels, and you are done.
 
I see. At the end of the video, I showed screenshots of what a possible release for mobile will look like. All of that is work in progress. Not available at the moment.
 
@Playstation Thanks for the awesome WL code. I did look at my code and I'm using the below code for all the time frame but it is not loading any of the Text inside . I have updated again with the below code for all the 5 time frames and set the correct aggregation period. I really love your approach and I would like make this work for me. Would you please help me out.

P8ogDvn.jpg


This is my another watch list, CLSD was loaded with Buy zone 4 on 1 HR and PGEN with Zone 2 on 4HR.

7LBgGfp.jpg



Code:
# blackFLAG FTS SwingArms
# StudyName: blackFLAG_Futures_SwingArm_ATRTrail
# My preferred setting is 28 / 5 FOR ALL TIMEFRAMES
# Edited by: Jose Azcarate
# blackFLAG Futures Trading - FOR EDUCATIONAL PURPOSES ONLY
# TWITTER: @blackflagfuture

# SwingArm Watchlist by @fishstick1229
# * Updated code below is to be used for custom watchlist column only **

# Updated text display by @Fishbed
# Edited by Playstation 060620 from fishstick1229 edit, criteria price must show bounce

input trailType = {default modified, unmodified};
input ATRPeriod = 28;
input ATRFactor = 5;
input firstTrade = {default long, short};
input averageType = AverageType.WILDERS;

input fib1Level = 61.8;
input fib2Level = 78.6;
input fib3Level = 88.6;

Assert(ATRFactor > 0, "'atr factor' must be positive: " + ATRFactor);

def HiLo = Min(high - low, 1.5 * Average(high - low, ATRPeriod));
def HRef = if low <= high[1]
then high - close[1]
else (high - close[1]) - 0.5 * (low - high[1]);
def LRef = if high >= low[1]
then close[1] - low
else (close[1] - low) - 0.5 * (low[1] - high);

def trueRange;
switch (trailType) {
case modified:
trueRange = Max(HiLo, Max(HRef, LRef));
case unmodified:
trueRange = TrueRange(high, close, low);
}
def loss = ATRFactor * MovingAverage(averageType, trueRange, ATRPeriod);

def state = {default init, long, short};
def trail;
switch (state[1]) {
case init:
if (!IsNaN(loss)) {
switch (firstTrade) {
case long:
state = state.long;
trail = close - loss;
case short:
state = state.short;
trail = close + loss;
}
} else {
state = state.init;
trail = Double.NaN;
}
case long:
if (close > trail[1]) {
state = state.long;
trail = Max(trail[1], close - loss);
} else {
state = state.short;
trail = close + loss;
}
case short:
if (close < trail[1]) {
state = state.short;
trail = Min(trail[1], close + loss);
} else {
state = state.long;
trail = close - loss;
}
}

def BuySignal = Crosses(state == state.long, 0, CrossingDirection.ABOVE);
def SellSignal = Crosses(state == state.short, 0, CrossingDirection.ABOVE);

def ex = if BuySignal then high else if SellSignal then low else if state == state.long then Max(ex[1], high) else if state == state.short then Min(ex[1], low) else ex[1];

def TrailingStop = trail;
def f1 = ex + (trail - ex) * fib1Level / 100;
def f2 = ex + (trail - ex) * fib2Level / 100;
def f3 = ex + (trail - ex) * fib3Level / 100;
def l100 = trail + 0;
def Fib1 = f1;
def Fib2 = f2;
def Fib3 = f3;

def bullAboveZone = state == state.Long and close > Fib1;

def bullZone2 = state == state.Long and close <= Fib1 and close > Fib2 and close>open and close[1]<open[1];
def bullZone3 = state == state.Long and close <= Fib2 and close > Fib3 and close>open and close[1]<open[1];
def bullZone4 = state == state.Long and close <= Fib3 and close > TrailingStop and close>open and close[1]<open[1];

def bearZone2 = state == state.Short and close >= Fib1 and close < Fib2 and close<open and close[1]>open[1];
def bearZone3 = state == state.Short and close >= Fib2 and close < Fib3 and close<open and close[1]>open[1];
def bearZone4 = state == state.Short and close >= Fib3 and close < TrailingStop and close<open and close[1]>open[1];

assignBackgroundColor(if state == state.long then Color.GREEN else Color.RED);
AddLabel(yes, if bullZone2 then "ZONE2" else if bullZone3 then "ZONE3" else if bullZone4 then "BUY ZONE4" else if bearZone2 then " ZONE 2" else if bearZone3 then " ZONE3" else if bearZone4 then "SELL ZONE4" else " ", if bullZone4 or bearZone4 then color.BLUE else Color.BLACK);
 
@lowtrade can you tell me how I can go about adding this code into my watch list? I watched the @greygoose video for the gadget but it did not change my main one. Any help is much appreciated.

Edit- nvm I rewatched the scan video on the 1st page of the thread.
 
Last edited:
@Billions

The details are on my website:
On-Boarding Our Strategy: Intro SwingArm Video


Swing Arm Indicators
https://tos.mx/68bDJGf 10 min base chart swing + V Profile
https://tos.mx/oidt0RP 1,5 10 grid minute trade entry
https://tos.mx/94LpkAL 6 grid swingarms
 
Tried to add the scanner code while watching the video on pg 1. Says I do not have permission to create a study in scan. Is this because I am using a paper trading account?
 
@Playstation Yes, you are amazing. All good now.

@fjr1300 If I switch my 15 min chart to daily then the clouds are gone. I'm not sure what was the actual issue. Any help would be appreciated.

15 Minute
y4BLkdi.jpg


Daily
Lj6G1E4.jpg
 
Last edited by a moderator:
@lowtrade make sure your charts have ~30 bars depending on the timeframe, make the length of the chart greater than then 28 bars ~30.
 
When copying and pasting the buy alert and sell alert off of the blackflag website, when I paste it, TOS says "rec usage not allowed in this context". Its in thescript editor. Any advice guys?
 
Status
Not open for further replies.

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
323 Online
Create Post

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