|
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.
|