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

Status
Not open for further replies.

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

@Playstation, it does seem to work correctly for me, I even posted a 10min screenshot of the zone, the watchlist on ES was showing short in zone 4 as per above posts. I can also see it now for instance live on a 1min chart ES short and in the zones as well for the alert.

CZ1S4DU.png


KHTDaJW.png
 
I am wondering - Is there a central location - one can find the updated chart+scripts. Thank You Master Jose!!
and Ben for the platform!!!

Working on it. We will update you soon. For now, it is this forum and major updates via the VIP room. Join us and we can assist in your implementation with proper education and full time in session live screen sharing.


I provided all the updates to all members last night.
 
Wow, @fjr1300 this is great! A big thank you to all who have made this happen and for sharing it with us. Great blackFlag website as well.

Currently in the process of watching the videos you have provided. Very informative and well done. I'm learning a lot. Much appreciated!

Cheers,
Rick
 
Wow, @fjr1300 this is great! A big thank you to all who have made this happen and for sharing it with us. Great blackFlag website as well.

Currently in the process of watching the videos you have provided. Very informative and well done. I'm learning a lot. Much appreciated!

Cheers,
Rick

Join us daily within the VIP room for live trading and screen sharing sessions. The content is one thing, the education provides you the trading success opportunity you are looking for. the best investment you will ever make.
 
Hi Ben- I am not able to find the where the discussion is taking place in the VIP discord? You already gave me the access to it.
 
@fjr1300 . Thank you Jose. Used to live in Miami at South Beach. I should have never left haha.

Anyways Back to business-- I have one question. I watched most of the zoom videos but was a bit unclear on buying just outside of the "bucket". Just for context I only long stocks ( broker limitation) on 3 minute chart. A lot of times there is no true retest of those fib levels after a swing arm break. Particularly at market open for the more popular stocks of the day that just start running. Price generally circles back close to, but not into those zones fully. Would you support the idea of adjusting those fib levels lower to make entrys more realistic? I know you said on the video that you would buy at the swing arm break level if needed, but even that that level often doesn't get revisted after the first candle on the break to upside.

At the end of the day it's the cliche trading problem of not wanting to miss out on a big trade but also not trying to chase a Porshe with a bicycle 😁
 
@BenTen, I managed to upgrade today and sent you a message as well on the discord channel for access. Kindly provide the necessary access for AMM2.0 and SwingArms live trading room, thanks.
 
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 [USER=278]@fishstick1229[/USER]
# * Updated code below is to be used for custom watchlist column only **

#Updated text display by [USER=4199]@Fishbed[/USER]

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;
def bullZone3 = state == state.long and close <= Fib2 and close > Fib3;
def bullZone4 = state == state.long and close <= Fib3 and close > TrailingStop;

def bearZone2 = state == state.short and close >= Fib1 and close < Fib2;
def bearZone3 = state == state.short and close >= Fib2 and close < Fib3;
def bearZone4 = state == state.short and close >= Fib3 and close < TrailingStop;

# watchlist
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);

Watchlist update:

ofaOaCU.jpg
 
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
363 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