NexusFi: Find Your Edge


Home Menu

 





MA Crosses indicator for Thinkorswim


Discussion in ThinkOrSwim

Updated
    1. trending_up 256 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 alexjohng45 
London / United Kingdom
 
Posts: 2 since May 2026

Hey guys,

Wanted to share a simple MA Crosses indicator I’ve been using lately in Thinkorswim for Futures and Forex.

It gives signals when fast and slow moving averages cross and plots arrows directly on the chart. Nothing fancy — just a clean way to spot possible trend shifts without overloading the screen with indicators.

Main settings:

Fast MA: 20
Slow MA: 80
EMA
Daily aggregation

Script:

input price = FundamentalType.CLOSE;
input Period = AggregationPeriod.DAY;
input ActualPeriod = {default "Yes", "No"};

input FastLength = 20;
input SlowLength = 80;
input averageType = AverageType.exponential;

def period2 = getAggregationPeriod();
def agg = if !ActualPeriod then getAggregationPeriod() else Period;

plot Fast_MA = MovingAverage(averageType, Fundamental(price, period = agg), FastLength);
plot Slow_MA = MovingAverage(averageType, Fundamental(price, period = agg), SlowLength);

def bSignalDown = Crosses(Fast_MA, Slow_MA, CrossingDirection.ABOVE);
def bSignalUp = Crosses(Fast_MA, Slow_MA, CrossingDirection.BELOW);

plot up = if bSignalUp then high else double.NaN;
plot down = if bSignalDown then high else double.NaN;

up.SetPaintingStrategy(paintingStrategy.BOOLEAN_ARROW_down);
down.SetPaintingStrategy(paintingStrategy.BOOLEAN_ARROW_up);

up.SetDefaultColor(color.LIGHT_RED);
down.SetDefaultColor(color.LIGHT_GREEN);

Slow_MA.SetLineWeight(2);

Sharing it because simple indicators sometimes work better than overloaded setups. Maybe someone here will find it useful too.


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Topstep Acquires The Futures Desk -- Prop Firm Consolida …
Funded Trading Evaluation Firms
April Jobs Beat Flips Fed Hike Odds Past 52% for First T …
Traders Hideout
Roland Garros Final Day: $3M on Zverev at 80.5% -- Leban …
Prediction Markets & Event Contracts
CME Group Fee Schedule Changes Hit All Four Exchanges -- …
Traders Hideout
Without Pulisic, USA 61.5% Live vs. Australia -- France …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
205 thanks
Sober Journey With S&P
21 thanks
30 Sessions
20 thanks
Volume Indicators
8 thanks
Thanks Mike. Godspeed.
7 thanks
  #2 (permalink)
 
Fi's Avatar
 Fi 
NexusFi
 


alexjohng45 View Post
Sharing it because simple indicators sometimes work better than overloaded setups.

@alexjohng45,

Welcome to the forum, and thanks for contributing a working script right out of the gate -- solid first post.

A few things worth noting about this setup:

The daily aggregation lock is a smart design choice. Locking the MAs to daily bars means signals don't repaint as intraday candles form, and it filters out a lot of the noise that kills EMA crossover strategies on shorter timeframes. There's backtest research across multiple assets showing daily EMA crossovers significantly outperform hourly setups -- H1 crossovers on instruments like NAS100 or EURUSD tend to hover near breakeven or lose, while D1 can carry a real edge.

One heads-up for anyone modifying the code: the variable names are inverted from what you'd expect -- bSignalDown fires on the bullish cross (fast above slow) and bSignalUp fires on the bearish cross. The arrow display is correct, but if you're building additional conditions off those variables, double-check the logic first or you'll get flipped signals.

On the 20/80 pair: it's a wider spread than common pairs like 9/21 or 20/50, so signals are less frequent but represent more significant trend shifts -- the 80 EMA covers roughly 4 months of daily data. It functions better as a trend filter than a pure entry trigger. Adding an ATR gate (skip signals when volatility is below its recent median) can help reduce whipsaw in flat, choppy conditions.

If you ever want to explore similar EMA-based strategy development natively in a futures platform, @NinjaTrader has good tooling for that.

TGIF! Have a good weekend!

-- Fi

"The fewer signals a system generates, the more seriously you can take each one."


Learn more about Fi AI trading companion
IMPORTANT: I can make mistakes! Always verify data before relying on it.

Please leave feedback here. You can disable my ability to reply to your posts by placing me on your ignore list.

Fi provides educational information on a best-effort basis only. You are responsible for your own trading decisions and for verification of all data. This message is not trading advice.
Reply With Quote
  #3 (permalink)
 alexlopty45 
Lima/Columbia
 
Posts: 1 since Jun 2026


oh nice 👌

are you planning to share more indicators in the future?

this one actually helped me quite a bit and hopefully it helped others too

just curious did you guys develop this indicator yourselves or was it based on an existing idea?


Reply With Quote
  #4 (permalink)
 
Fi's Avatar
 Fi 
NexusFi
 


alexlopty45 View Post
just curious did you guys develop this indicator yourselves or was it based on an existing idea?

@alexlopty45,

The thread doesn't spell it out -- alexjohng45 shared it as something they've been using without specifying the origin. Pretty common with TOS scripts, most are iterations on existing MA logic anyway.

If you want the backstory, worth asking alexjohng45 directly.

-- Fi

"The best indicators aren't always the ones you build -- sometimes they're the ones someone else already stress-tested and handed you for free."


Learn more about Fi AI trading companion
IMPORTANT: I can make mistakes! Always verify data before relying on it.

Please leave feedback here. You can disable my ability to reply to your posts by placing me on your ignore list.

Fi provides educational information on a best-effort basis only. You are responsible for your own trading decisions and for verification of all data. This message is not trading advice.
Reply With Quote




Last Updated on June 12, 2026


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts