Moxie Indicator for ThinkorSwim

Hi Jonas99, can u do a search on VJ & Friends discord channel....the discord link was deleted by admin previously. i do not wish to violate any rules.
tried but no result. why can we just post info? are we being monitored by the big brother? LOL
 

New Indicator: Buy the Dip

Check out our Buy the Dip indicator and see how it can help you find profitable swing trading ideas. Scanner, watchlist columns, and add-ons are included.

Download the indicator

For Discord, we'd have to join the same server, by invite, as far as I know. Some of the invitation links are posted publicly, like the one run by this site. Then we can private message but we can't create our own groups. One of us would need to pay for a server to get more than a few people together. It's a cheap subscription but I don't feel like managing the server and users.

re: Mastery, I still haven't firmly decided but it seems unlikely I'll renew. I think the strategy is fine. He needs to follow it. And then he got us out of QS which actually looked decent (on the daily chart) even if it had a down day along with the market. I'm guessing I'll stick with the strategy and get rid of TG Watkins. My best trade with it, so far, was one I found. I'll continue trading his alerts for now. With so many following, it's a race to jump in before price climbs. I can't take much time to decide if I like the trade before I get in. I'm going to start taking a hard look at the trade after I'm in to see if I want to keep it or get out.

It's reasonable to bounce around a little bit while finding a style that fits you. You really should consider paper trading during that phase, though. I know the desire is there to make some money but losing at first is normal. Build trust in something for a few weeks before you bet your money on it. Your account balance will likely be higher for it in the end, even though you're going to hate the green days that make you wish you have real money in the market.

Copying a pro's trades should help with the beginner's losses but, as you've found out, not always. And copying someone else's trades is a slower way to learn and build confidence in a strategy. I still don't know why those trades looked good to him this week and if they had worked I'd probably be learning a bad habit. Better to fail on my own and at least know why I took the trade and then investigate why it didn't work.

Unless your goal is to just find someone to follow and not invest so much time/effort in trading, which is reasonable. I've given it a little consideration lately. I enjoy trading but it's tempting to pay for an alert service that doesn't **** (if that can be found) and free my time up for something I enjoy even more.
@Slippage I made the most progress by studying other people's charts esp. on tradingview and by joining Atlas large-cap group where people posting charts constantly. SO is so geared towards selling classes and indicators they tend to be falling behind real-world trading. I learned to focus on price levels, structures, and patterns. Indicators really are secondary.
 
Hi slippage, how do I get in contact with you? I found something I want you to check out. Can I post my email address here? Or my discord name? I just sent you my email address in the moxie room chat. Didn't want to do it here since it's a public forum.
Sorry, I never saw it. There were some days I wasn't logged in there. Some days I had it logged in and TOS running but I wasn't at my desk but on the couch watching Netflix and waiting to see if TG sent any alerts. Did you join Vicky's Discord? We can chat there, either privately or with the group.
 
@Slippage I made the most progress by studying other people's charts esp. on tradingview and by joining Atlas large-cap group where people posting charts constantly. SO is so geared towards selling classes and indicators they tend to be falling behind real-world trading. I learned to focus on price levels, structures, and patterns. Indicators really are secondary.

Until I switched to swing trading I was day trading based purely on candlestick patterns so I understand what you mean. Moxie is actually a pretty small part of the strategy they teach with it.

Yes, Simpler's marketing, once they have your email address, is non-stop. The only way to opt out seems to also opt you out of notifications of things I actually do care about (for now) so for the time being I'm just ignoring the marketing.
 
While the market's been messy I've been enjoying time away from all of this. I need to deal with my taxes and some other tasks in the next week or so and I'll probably manage to update the Moxie code here with the trampoline arrows within the next week.

After that, I'm thinking of scripting a back-test for the trampoline setup whenever I have time/ambition but I might do some testing with squeeze setups first.
 
@Slippage I have seen you in the chat rooms and agree with your opinion. I do have a question/request when you have the time. I do have the Simpler Moxie 15 High indicator. Specifically, looking to modify the 15min moxie high code and create a 2 min moxie and 5minute moxie combo. There would be two lines on the chart, a 2 mon and a 5 min. I am not a coder but would like to try a strategy. Hopefully a quick and simple thing to do. Thank you.
 
@Slippage I have seen you in the chat rooms and agree with your opinion. I do have a question/request when you have the time. I do have the Simpler Moxie 15 High indicator. Specifically, looking to modify the 15min moxie high code and create a 2 min moxie and 5minute moxie combo. There would be two lines on the chart, a 2 mon and a 5 min. I am not a coder but would like to try a strategy. Hopefully a quick and simple thing to do. Thank you.

I can probably put that together for you some time next week. Until I get to this, if you're not looking for when the lines cross each other you can add TG's 2m Moxie script on your 5m chart. Similarly, I use a 2m Moxie above 5m Moxie on my 5m chart. Is the lines crossing what you're interested in, though?
 
@Slippage Actually yes I would be looking for a cross of the 2 and 5 minute moxies. Would like to see the crosses on a 1 minute chart (or maybe other short time frames).
thanks for getting back so fast. Sounds like you are doing something similar to what I’m looking to do. I just have the ST 15 minute High to modify if that matters.
 
Sorry, I never saw it. There were some days I wasn't logged in there. Some days I had it logged in and TOS running but I wasn't at my desk but on the couch watching Netflix and waiting to see if TG sent any alerts. Did you join Vicky's Discord? We can chat there, either privately or with the group.
Oh well. So what I wanted to share with you is FlowTrade. Look it up. They offer one week free trial. @VickyVJ same to you. Just look it up and you can try them out. Obviously TG is not going anywhere, it doesn't look like it. He doesn't play big stocks and the ones he does aren't doing well. In the next couple of weeks SPY is going to take a huge dump and it means that there will not be any more trading for a while. Who knows, it might take longer for an adjustment. check out what the institutional investors have been doing for the last two weeks vs SPY prices

 
Thanks. I'll check them out. I see they have a YouTube channel with webinars and such.
yes it's not super developed, i don't think. You can get a basic overview. It's just group of guys that created an indicator that measures Institutional sentiment. A lot of them use it to day trade but do some swings too. They rely on keltner channels as their primary strategy and teach how they trade. The cool thing is that you can see what algos are doing in real time. They do show future prices movement, not current. It might take a little bit of time to play out. Their discord is very active, with people on voice every day. and they talk directly to the traders and you can ask as many questions as you want. I cancelled my Moxie subscription ( I have it through May I think). and am going to stick with these guys for now. When TG was taking his last few trades (riot, nndm, fubo and space, I looked at the algos and they were all pointing straight down). I didn't take those. You know what happened with those trades.
 
Oh well. So what I wanted to share with you is FlowTrade. Look it up. They offer one week free trial. @VickyVJ same to you. Just look it up and you can try them out. Obviously TG is not going anywhere, it doesn't look like it. He doesn't play big stocks and the ones he does aren't doing well. In the next couple of weeks SPY is going to take a huge dump and it means that there will not be any more trading for a while. Who knows, it might take longer for an adjustment. check out what the institutional investors have been doing for the last two weeks vs SPY prices

Thanks Homemadeitmyslf...will check it out. honestly i m truly disappointed. after it ends, i wont renew.

Mkt is due for a v minor dip next week. small breathe-in n then it should bounce from here before the next correction in summer.
 
Last edited:
yes it's not super developed, i don't think. You can get a basic overview. It's just group of guys that created an indicator that measures Institutional sentiment. A lot of them use it to day trade but do some swings too. They rely on keltner channels as their primary strategy and teach how they trade. The cool thing is that you can see what algos are doing in real time. They do show future prices movement, not current. It might take a little bit of time to play out. Their discord is very active, with people on voice every day. and they talk directly to the traders and you can ask as many questions as you want. I cancelled my Moxie subscription ( I have it through May I think). and am going to stick with these guys for now. When TG was taking his last few trades (riot, nndm, fubo and space, I looked at the algos and they were all pointing straight down). I didn't take those. You know what happened with those trades.

I watched their webinar and it looks promising. I'll sign up for the trial some time soon. Have you taken many swing trades with them yet? How's it working out? Hopefully better than the equally priced Moxie Mastery.
 
I won't be updating the full indicator code here any more. If you want the trampoline arrows, you can replace that part of the code with the code below. Just replace the lines from the trampoline comment to the squeeze comment. Comments start with #. Adjust the arrowBuffer input to change the vertical padding between the arrows and the zero line. Higher is more space.

Ruby:
# Indicate the Trampoline setup
input showTrampolineArrows = yes;
input arrowBuffer = .05;
def sma50 = Average(close, 50);
def isTrampoline = Moxie > 0 and close < sma50;
def isInvertedTrampoline = Moxie < 0 and close > sma50;
plot Trampoline =
  if showTrampolines and (isTrampoline or isInvertedTrampoline) then 0
  else Double.NaN
;
Trampoline.SetPaintingStrategy(PaintingStrategy.SQUARES);
Trampoline.DefineColor("Bullish", Color.LIGHT_GREEN);
Trampoline.DefineColor("Bearish", Color.PINK);
Trampoline.AssignValueColor(if close > sma50 then Trampoline.Color("Bearish") else Trampoline.Color("Bullish"));
Trampoline.HideBubble();
Trampoline.HideTitle();

plot TrampolineArrowUp =
  if showTrampolineArrows and isTrampoline then -AbsValue(HighestAll(Moxie)) * arrowBuffer
  else Double.NaN
;
TrampolineArrowUp.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
TrampolineArrowUp.SetDefaultColor(Color.UPTICK);
TrampolineArrowUp.HideTitle();
TrampolineArrowUp.HideBubble();

plot TrampolineArrowDown =
  if showTrampolineArrows and isInvertedTrampoline then 0 + AbsValue(HighestAll(Moxie)) * arrowBuffer
  else Double.NaN
;
TrampolineArrowDown.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
TrampolineArrowDown.SetDefaultColor(Color.RED);
TrampolineArrowDown.HideTitle();
TrampolineArrowDown.HideBubble();
 
Last edited:
@Slippage I have seen you in the chat rooms and agree with your opinion. I do have a question/request when you have the time. I do have the Simpler Moxie 15 High indicator. Specifically, looking to modify the 15min moxie high code and create a 2 min moxie and 5minute moxie combo. There would be two lines on the chart, a 2 mon and a 5 min. I am not a coder but would like to try a strategy. Hopefully a quick and simple thing to do. Thank you.

Make a copy of TG's 15m high study and do a search/replace on the text...
  • Replace AggregationPeriod.Hour with AggregationPeriod.FIVE_MIN
  • Replace AggregationPeriod.Two_HOURS with AggregationPeriod.FIFTEEN_MIN
Note that only higher timeframes can be accessed in code not lower timeframes. This script will only work on 5m and lower charts. On other timeframes it probably won't draw anything and it would give you an error icon in the upper left of the indicator's area instead.
 
yes it's not super developed, i don't think. You can get a basic overview. It's just group of guys that created an indicator that measures Institutional sentiment. A lot of them use it to day trade but do some swings too. They rely on keltner channels as their primary strategy and teach how they trade. The cool thing is that you can see what algos are doing in real time. They do show future prices movement, not current. It might take a little bit of time to play out. Their discord is very active, with people on voice every day. and they talk directly to the traders and you can ask as many questions as you want. I cancelled my Moxie subscription ( I have it through May I think). and am going to stick with these guys for now. When TG was taking his last few trades (riot, nndm, fubo and space, I looked at the algos and they were all pointing straight down). I didn't take those. You know what happened with those trades.
Yes I have. They worked out my first week with them and then I got killed this week. This was my fault though (these guys don't call out trades like Simpler does). They do talk about what they are trading or discuss set ups. They teach you to trade, but don't tell you what to trade. I got killed because I went short, against the market. I misunderstood the premise. Each Saturday there is a training session that goes through their scans that identify algo divergence in relationship to keltner channels and potential plays. Because I did so well in the first week, I jumped the gun on a lot of trades and was surprised when none of the divergences played out by week's end. What I learned is that it takes time to play out and that i din't have the right set ups. Their main guy was so nice to host and impromptu zoom call with me for 1.5 hours to go over what I was doing wrong ( no extra charge unlike simple lol) Anyway, I won't be looking for divergences for now, but rather for trades where algos support my bias. I can explain all of that once you are in their discord and we can chat.
 
Moxie Mastery Mid-Membership Review

I'm about half way through my 3-month membership so this seems like a good time for an update.

I like TG. He's more humble than I expected. He describes creating Moxie as he "stumbled upon the bones of it" and "worked with it" to develop it into something and that, being a non-coder, it was a long and difficult process. And once he had the indicator he spent another year testing timeframes and building the strategy. I appreciate his honesty and humility in that versus claiming he's a super genius. He's approachable and I think he genuinely wants to share his knowledge and experience to the benefit of others. I believe his personality is also the type to enjoy the sense of fame and there's definitely plenty of people in his chatroom stroking his ego. And, of course, he's making a lot of money from his students.

He's on a losing streak. His alerts have nearly all failed since I joined. A couple trades went respectably well. A few were small profits. Most were losses. After long-ish periods of no activity he alerts 3-5 names in a single day and most turn red the next day never look back. I've been trying to determine why and this is what I've thought of so far...
  • He just had his first million dollar day shortly before this. Milestones like that often mess with a trader's psychology and are followed by losses.
  • The market was a bit wild at the beginning of my membership but that's not an excuse now. I'm finding tradeable plays that work out fine on days he doesn't call anything.. And then his alerts eat my gains.
  • He's breaking his own rules and seemingly expecting hourly setups to overpower bad daily charts. I think he's still trading 2020's covid recovery when it was probably hard to lose in swings. It seems like he's trading as if these are trend continuations but most of these stocks need true reversals to move higher again.
  • He's been on two ski trips and got engaged during this month and a half so his head isn't entirely in the game.
Customers in his chatroom are a mix ranging from brand new and clueless to experienced traders. The vast majority of chat is friendly and/or professional. Some members are blindly devoted to TG and attack if you offer any criticism of their idol. I'm happy to say the room is surprisingly free from politics when topics come up like government/bank policy, covid, vaccines, etc. Everyone self-censors well.

Simpler Trading's marketing is non-stop. I get several marketing emails per day representing various traders regarding various products. I also get push alerts to watch their other traders' webinars. There is no way to control any of it. The opt-out is like a master switch that turns on/off everything and there's no way to keep just the few things you want. Even their customer service emails come from the same email address as all the junk.

They recently opened their "training room" all day to members of all Mastery subscriptions. There's presentations throughout the entire day. Most days I forget to open it and I haven't watched much of it. Recordings are available. It's mostly marketing their traders and indicators but I think there is some benefit in seeing the market from different perspectives and with different tooling. In some that I watched they showed and discussed setups they're waiting to fully develop so it could lead to finding some good plays.

For me, at this point, Moxie Mastery is a money-losing distraction. I don't plan to continue paying for my membership. It's possible that could change before my time runs out, if his alerts start working a lot better, but I find it unlikely.

The indicator is fine. The strategy seems fine though I need more experience with it. I did some back-testing yesterday with the Trampoline setup on daily charts and that is profitable the way I tested it. During that testing I saw several successful setups in the last couple of weeks we could have taken if TG was on the ball.
 
Last edited:
@Slippage Thank you. And your assessment of the room is spot on. Good people in general, no politics. TG does seem to mean well and respect he firmly believes in his product. Chances to see different traders and you can pick what you like to form your own strategy. And it will be interesting to see how Moxie will hold up in a market that is not fueled by government printing money.
 
Hopefully this will be the final code. The code for the scans have not changed since they were posted earlier. I just wanted to bring all the pieces together in this post as the (hopefully) final and complete package.

1. This resolves a bug for 15m. It should use close price rather than high price.
2. This makes it so the second line is shown by default on 15m and no other timeframes. I changed this to stop the confusion some members ran into with why the second line didn't appear automatically on 15m.

Moxie Upper:
Ruby:
declare upper;

def currentAggPeriod = GetAggregationPeriod();
def higherAggPeriod =
  if currentAggPeriod <= AggregationPeriod.TWO_MIN then AggregationPeriod.FIVE_MIN
  else if currentAggPeriod <= AggregationPeriod.THREE_MIN then AggregationPeriod.TEN_MIN
  else if currentAggPeriod <= AggregationPeriod.FIVE_MIN then AggregationPeriod.FIFTEEN_MIN
  else if currentAggPeriod <= AggregationPeriod.TEN_MIN then AggregationPeriod.THIRTY_MIN
  else if currentAggPeriod <= AggregationPeriod.FIFTEEN_MIN then AggregationPeriod.HOUR
  else if currentAggPeriod <= AggregationPeriod.THIRTY_MIN then AggregationPeriod.TWO_HOURS
  else if currentAggPeriod <= AggregationPeriod.TWO_HOURS then AggregationPeriod.DAY
  else if currentAggPeriod <= AggregationPeriod.FOUR_HOURS then AggregationPeriod.TWO_DAYS
  else if currentAggPeriod <= AggregationPeriod.DAY then AggregationPeriod.WEEK
  else if currentAggPeriod <= AggregationPeriod.WEEK then AggregationPeriod.MONTH
  else AggregationPeriod.QUARTER
;

script MoxieFunc {
  input price = close;
  def vc1 = ExpAverage(price, 12) - ExpAverage(price , 26);
  def va1 = ExpAverage(vc1, 9);
  plot data = (vc1 - va1) * 3;
}

def Moxie = MoxieFunc(close(period = higherAggPeriod));

def longTrigger = if Moxie > 0 and Moxie[1] <= 0 then Moxie else Double.NaN;
def longArrowPosition =
  # first arrow
  if Moxie == longTrigger and Moxie != Moxie[1] then low
  # consecutive arrows at same position
  else if Moxie == longTrigger and Moxie == Moxie[1] then longArrowPosition[1]
  else Double.NaN;
plot long = longArrowPosition;
long.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
long.SetDefaultColor(Color.GREEN);
long.SetLineWeight(3);
long.HideBubble();
long.HideTitle();

def shortTrigger = if Moxie < 0 and Moxie[1] >= 0 then Moxie else Double.NaN;
def shortArrowPosition =
  # first arrow
  if Moxie == shortTrigger and Moxie != Moxie[1] then high
  # consecutive arrows at same position
  else if Moxie == shortTrigger and Moxie == Moxie[1] then shortArrowPosition[1]
  else Double.NaN;
plot short = shortArrowPosition;
short.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
short.SetDefaultColor(Color.LIGHT_RED);
short.SetLineWeight(3);
short.HideBubble();
short.HideTitle();

Moxie Lower:
Ruby:
declare lower;

input showVerticalLines = yes;
input showTrampolines = yes;
input showSqueezeDots = no;

plot ZeroLine = if !IsNaN(open) and !showSqueezeDots then 0 else Double.NaN;
ZeroLine.SetDefaultColor(Color.GRAY);
ZeroLine.SetLineWeight(2);
ZeroLine.HideBubble();
ZeroLine.HideTitle();

def currentAggPeriod = GetAggregationPeriod();
def higherAggPeriod =
  if currentAggPeriod <= AggregationPeriod.TWO_MIN then AggregationPeriod.FIVE_MIN
  else if currentAggPeriod <= AggregationPeriod.THREE_MIN then AggregationPeriod.TEN_MIN
  else if currentAggPeriod <= AggregationPeriod.FIVE_MIN then AggregationPeriod.FIFTEEN_MIN
  else if currentAggPeriod <= AggregationPeriod.TEN_MIN then AggregationPeriod.THIRTY_MIN
  else if currentAggPeriod <= AggregationPeriod.FIFTEEN_MIN then AggregationPeriod.HOUR
  else if currentAggPeriod <= AggregationPeriod.THIRTY_MIN then AggregationPeriod.TWO_HOURS
  else if currentAggPeriod <= AggregationPeriod.TWO_HOURS then AggregationPeriod.DAY
  else if currentAggPeriod <= AggregationPeriod.FOUR_HOURS then AggregationPeriod.TWO_DAYS
  else if currentAggPeriod <= AggregationPeriod.DAY then AggregationPeriod.WEEK
  else if currentAggPeriod <= AggregationPeriod.WEEK then AggregationPeriod.MONTH
  else AggregationPeriod.QUARTER
;

script MoxieFunc {
  input price = close;
  def vc1 = ExpAverage(price, 12) - ExpAverage(price , 26);
  def va1 = ExpAverage(vc1, 9);
  plot data = (vc1 - va1) * 3;
}

plot Moxie = MoxieFunc(close(period = higherAggPeriod));
Moxie.SetLineWeight(2);
Moxie.DefineColor("Up", Color.GREEN);
Moxie.DefineColor("Down", Color.RED);
def lastChange = if Moxie < Moxie[1] then 1 else 0;
Moxie.AssignValueColor(
  if lastChange == 1 then Moxie.Color("Down")
  else Moxie.Color("Up")
);

# Watkins uses a different setup for Moxie on his 15 minute charts.
# He uses two lines derived from two higher timeframes.
# For timeframes other than 15 minutes we'll use the same data as
# first Moxie line to reduce data requested from the server and
# improve performance.
def secondAggPeriod =
  if currentAggPeriod == AggregationPeriod.FIFTEEN_MIN
  then AggregationPeriod.TWO_HOURS
  else currentAggPeriod
;

plot MoxieSecondLine =
  if currentAggPeriod == AggregationPeriod.FIFTEEN_MIN
  then MoxieFunc(close(period = secondAggPeriod))
  else Double.NaN
;

MoxieSecondLine.SetLineWeight(2);
MoxieSecondLine.DefineColor("Up", Color.GREEN);
MoxieSecondLine.DefineColor("Down", Color.RED);
def lastChangeSecondLine = if MoxieSecondLine < MoxieSecondLine[1] then 1 else 0;
MoxieSecondLine.AssignValueColor(
  if lastChangeSecondLine == 1 then MoxieSecondLine.Color("Down")
  else MoxieSecondLine.Color("Up")
);
MoxieSecondLine.SetHiding(currentAggPeriod != AggregationPeriod.FIFTEEN_MIN);

# Show vertical lines at crossovers
AddVerticalLine(showVerticalLines and Moxie[1] crosses above 0, "", CreateColor(0,150,0), Curve.SHORT_DASH);
AddVerticalLine(showVerticalLines and Moxie[1] crosses below 0, "", CreateColor(200,0,0), Curve.SHORT_DASH);

# Indicate the Trampoline setup
def sma50 = Average(close, 50);
plot Trampoline =
  if showTrampolines and ((Moxie < -.01 and close > sma50) or (Moxie > .01 and close < sma50))
  then 0
  else Double.NaN
;
Trampoline.SetPaintingStrategy(PaintingStrategy.SQUARES);
Trampoline.DefineColor("Bullish", Color.LIGHT_GREEN);
Trampoline.DefineColor("Bearish", Color.PINK);
Trampoline.AssignValueColor(if close > sma50 then Trampoline.Color("Bearish") else Trampoline.Color("Bullish"));
Trampoline.HideBubble();
Trampoline.HideTitle();

# show squeeze dots on zero line
def bb = reference BollingerBands.LowerBand;
def squeezeLevel =
  if bb > KeltnerChannels(factor = 1.0).Lower_Band then 3
  else if bb > KeltnerChannels(factor = 1.5).Lower_Band then 2
  else if bb > KeltnerChannels(factor = 2.0).Lower_Band then 1
  else 0
;

plot Squeeze = if !showSqueezeDots then Double.NaN else if !IsNaN(open) then 0 else Double.NaN;
Squeeze.SetPaintingStrategy(PaintingStrategy.POINTS);
Squeeze.SetDefaultColor(Color.GRAY);
Squeeze.DefineColor("Loose Squeeze", Color.UPTICK);
Squeeze.DefineColor("Squeeze", Color.RED);
Squeeze.DefineColor("Tight Squeeze", Color.YELLOW);
Squeeze.DefineColor("No Squeeze", Color.GRAY);
Squeeze.AssignValueColor(
  if squeezeLevel == 3 then Squeeze.Color("Tight Squeeze")
  else if squeezeLevel == 2 then Squeeze.Color("Squeeze")
  else if squeezeLevel == 1 then Squeeze.Color("Loose Squeeze")
  else Squeeze.Color("No Squeeze")
);
Squeeze.SetLineWeight(2);
Squeeze.HideTitle();
Squeeze.HideBubble();

AddLabel(
  yes,
  if currentAggPeriod == AggregationPeriod.WEEK then " W "
  else if currentAggPeriod == AggregationPeriod.Day then " D "
  else if currentAggPeriod == AggregationPeriod.HOUR then " H "
  else if currentAggPeriod == AggregationPeriod.FIFTEEN_MIN then " 15 "
  else if currentAggPeriod == AggregationPeriod.FIVE_MIN then " 5 "
  else if currentAggPeriod == AggregationPeriod.TWO_MIN then " 2 "
  else " ",
  if Moxie < 0 then Color.RED else Color.GREEN
);

Trigger scan:
Ruby:
# because Moxie calculates from higher time frame
# to find daily entries, run this scan on weekly
# to find hourly entries, run this on daily
script Moxie {
    input priceC = close;
    def vc1 = ExpAverage(priceC , 12) - ExpAverage(priceC , 26);
    def va1 = ExpAverage(vc1, 9);
    plot sData = (vc1 - va1) * 3;
}
def m = Moxie();
def moxieUpArrow = m > 0 and m[1] <= 0;
plot scan = moxieUpArrow within 1 bars;

Trampoline scan from @Sneaky_Swings earlier in this thread:
Ruby:
# because Moxie calculates from higher time frame
# to find daily entries, run this scan on weekly
# to find hourly entries, run this on daily

def ap1 = close;

script MoxieFunc {
    input priceC = close;
    def vc1 = ExpAverage(priceC , 12) - ExpAverage(priceC , 26);
    def va1 = ExpAverage(vc1, 9);
    plot sData = (vc1 - va1) * 3;
}

def price = close;
def s2 = MoxieFunc(price);

def ZeroLine = 0;
def Moxie = s2;

# Indicate the Trampoline setup
def sma50 = SimpleMovingAvg(close, 50);

plot trampoline = (Moxie > 0.1 and close < sma50);

EDIT 3/1/21 to add squeeze dots on zero line
I am new to this group and a developer by trade. Your code is amazingly clean and well put together. I am impressed, thank you for the time it took to perfect this.
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
240 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