Strategy · Pine Script v4 · On the chart

Cerebr Centauri Strategy

by jerryinyang· code credited to Cerebr

Cerebr Centauri Strategy is a multi-indicator trading system for Pine Script v4 that combines Moving Averages (SMA, EMA, LSMA, WMA), Stochastic Oscillator, RSI, and MACD across both current and higher timeframes.

View on GitHub

GitHub stars5on the repository
Pine versionv4older, still runs
Lines of code461
Settings40inputs
LicenceNone statedfile: MPL-2.0
Last update2 years ago12 May 2024

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

461 lines of Pine Script v4 from All Works/Cerebr Centauri/Cerebr Centauri Study-Strategy.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

Cerebr Centauri Study-Strategy.pine
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Cerebr

//@version=4
strategy("Cerebr Centauri Strategy", shorttitle="Centauri Study", overlay=true, margin_long=100, margin_short=100, default_qty_value = 5000)
// study("Cerebr Centauri Study", shorttitle="Centauri Study", overlay=true)

//General Inputs
//{
res = input("240", "Higher Timeframe", input.resolution, group = "General Settings")
htfMeth = input("Inputs", "HTF Method?", options = ["Data Import", "TF Conversion", "Inputs"], group = "General Settings")
gapsOn = input(false, "Bar Merge On?", group = "General Settings")
exMeth = input("Exit Rules", "Position Exit Method", options = ["Both", "Exit Rules", "SL, TP, TLS"], group = "General Settings")
pipMult = input(1, "**Point-Pip Converter**", step = 1, group = "General Settings")

//Period Converter Function
//{
resToInt(_res) =>
    resInt = 0
    if _res == "D"
        resInt := 1440
    else if _res == "W"
        resInt := 10080
    else if _res == "M"
        resInt := 43200
    else
        resInt := round(tonumber(_res))
    
    resInt

periodConv(_len, _res) =>
    tf = round(tonumber(timeframe.period))
    htf = resToInt(_res)
    
    len = tf < htf ? ((htf * _len) / tf) : na
    
    len
//}

//Functions to Allow Series Length
//{
Sum(src,p) => a = cum(src), a - a[max(p,0)]

Sma(src,p) => a = cum(src), (a - a[max(p,0)])/max(p,0)

Ema(src,p) =>
    ema = 0.
    sf = 2/(p+1)
    ema := nz(ema[1] + sf*(src - ema[1]),src)

Wma(src,p) => 
    mp = max(p,0)
    denom = mp*(mp+1)/2
    a = cum(src), (mp*a - Sum(a[1],p))/denom

Lsma(src,p) => 
    mp = max(p,0)
    denom = mp*(mp+1)/2
    a = cum(src), b = (mp*a - Sum(a[1],p))/denom
    3*b - 2*(a - a[mp])/mp
    
//}

//}----- End of General Input
//FUNCTIONS ==> periodConv(_len, lres, _res)

//*************** CURRENT TIMEFRAME INDICATORS ***************//
//{

//MOVING AVERAGES
//{
maSrc = input(close, "Moving Average Source", input.source, group="MOVING AVERAGE")
maType = input("EMA", "Moving Average Type", options=["SMA", "EMA", "LSMA", "WMA"], group="MOVING AVERAGE")

fLen  = input(5, "Fast Moving Average", input.integer, group="MOVING AVERAGE")
sLen  = input(10, "Slow Moving Average", input.integer, group="MOVING AVERAGE")

calcMA(_len) =>
    ma = maType == "SMA" ? Sma(maSrc, _len) : 
      (maType == "EMA" ? Ema(maSrc, _len) : 
      (maType == "LSMA" ? Lsma(maSrc, _len) : 
      (maType == "WMA" ? Wma(maSrc, _len) : na)))
    ma
    
fastMa = calcMA(fLen)
slowMa = calcMA(sLen)

maLong = fastMa >= slowMa
maShort = fastMa <= slowMa

//}----- End of Moving Averages
//SIGNALS ==> maLong, maShort

//STOCHASTIC 
//{
periodK = input(10, title="Stoch Length", minval=1, group="STOCHASTIC")
smoothK = input(3, title="Stochastic Line", minval=1, group="STOCHASTIC")
periodD = input(3, title="Stoch Signal Line", minval=1, group="STOCHASTIC")
stOB    = input(80, title="Stoch Overbought", minval=50, group="STOCHASTIC")
stOS    = input(20, title="Stoch OverSold", minval=1, group="STOCHASTIC")


stoch  = sma(stoch(close, high, low, periodK), smoothK)
stSma = sma(stoch, periodD)

stLong = stoch >= stSma and stoch <= stOB
stShort = stoch <= stSma and stoch >= stOS

//}-----End of Stocastics
//SIGNALS ==> stLong, stShort

//RSI
//{
rsiSrc = input(close, "RSI Source", input.source, group="RSI")
rsiLen  = input(9, "RSI Period", input.integer, group="RSI")
usersiOBS = input(true, "Use RSI Overbought/Oversold Levels?", group="RSI")
rsiOB    = input(80, title="RSI Overbought", minval=50, group="RSI")
rsiOS    = input(20, title="RSI OverSold", minval=1, group="RSI")

rsi = rsi(rsiSrc, rsiLen)

rsiLong = usersiOBS ? rsi <= rsiOB : rsi >= 50
rsiShort = usersiOBS ? rsi >= rsiOS : rsi <= 50

//}----- End of RSI
//SIGNALS ==> rsiLong, rsiShort

//MACD
//{

macdSrc = input(close, "MACD Source", input.source, group="MACD")
macdfLen = input(12, "Fast MACD", input.integer, group="MACD")
macdsLen = input(21, "Slow MACD", input.integer, group="MACD")
macdSig = input(9, "MACD Signal Line", input.integer, group="MACD")
useDec = input(false, "Use MACD Decreasing Rule?")

[macd, signal, hist] = macd(macdSrc, macdfLen, macdsLen, macdSig)

decHistGreen = hist > 0 and hist[1] > hist
decHistRed = hist > 0 and hist[1] < hist

// Alternative Rule
// macdRed = hist < 0 or (hist == 0 and hist[1] > 0)
// macdGreen = hist > 0 or (hist == 0 and hist[1] < 0)

histRed = hist <= 0
histGreen = hist >= 0

macdUp = macd >= 0
macdDown = macd <= 0

macdLong = useDec ? histRed and decHistRed : macdUp
macdShort = useDec ? histGreen and decHistGreen : macdDown
//}
//SIGNALS ==> macdLong and macdShort

//}

//*************** HIGHER TIMEFRAME INDICATORS ***************//
//{

//HFT MOVING AVERAGE
//{

//INPUTS
inphtfFLen  = input(80, "Fast Moving Average", input.integer, group="HTF MOVING AVERAGE")
inphtfSLen  = input(162, "Slow Moving Average", input.integer, group="HTF MOVING AVERAGE")

//CONVERSIONS
convHtfFLen = periodConv(fLen, res)
convHtfSLen = periodConv(sLen, res)


//CALCULATIONS
htffastMa = htfMeth == "Data Import" ? (gapsOn ? security(syminfo.tickerid, res, fastMa, barmerge.gaps_on, barmerge.lookahead_off) : 
  security(syminfo.tickerid, res, fastMa, barmerge.gaps_off, barmerge.lookahead_off)) : 
  (htfMeth == "TF Conversion" ? (calcMA(convHtfFLen)) : 
  (htfMeth == "Inputs" ? (calcMA(inphtfFLen)) : 
  (na)))

htfslowMa = htfMeth == "Data Import" ? (gapsOn ? security(syminfo.tickerid, res, slowMa, barmerge.gaps_on, barmerge.lookahead_off) : 
  security(syminfo.tickerid, res, slowMa, barmerge.gaps_off, barmerge.lookahead_off)) : 
  (htfMeth == "TF Conversion" ? (calcMA(convHtfSLen)) : 
  (htfMeth == "Inputs" ? (calcMA(inphtfSLen)) : 
  (na)))

// SIGNALS
htfmaLong = htffastMa >= htfslowMa
htfmaShort = htffastMa <= htfslowMa

//}
//SIGNALS ==> htfmaLong, htfmaShort

//HTF STOCHASTICS
//{

//INPUTS
inphtfperiodK = input(162, title="Stoch Length", minval=1, group="HTF STOCHASTIC")
inphtfsmoothK = input(48, title="Stochastic Line", minval=1, group="HTF STOCHASTIC")
inphtfperiodD = input(48, title="Stoch Signal Line", minval=1, group="HTF STOCHASTIC")

//CONVERSIONS
convhtfperiodK = periodConv(periodK, res)
convhtfsmoothK = periodConv(smoothK, res)
convhtfperiodD = periodConv(periodD, res)

//CALCULATIONS


htfstoch = htfMeth == "Data Import" ? (gapsOn ? security(syminfo.tickerid, res, stoch, barmerge.gaps_on, barmerge.lookahead_off) : 
  security(syminfo.tickerid, res, stoch, barmerge.gaps_off, barmerge.lookahead_off)) : 
  (htfMeth == "TF Conversion" ? (sma(stoch(close, high, low, convhtfperiodK), convhtfsmoothK)) : 
  (htfMeth == "Inputs" ? (sma(stoch(close, high, low, inphtfperiodK), inphtfsmoothK)) : 
  (na)))

htfstSma = htfMeth == "Data Import" ? (gapsOn ? security(syminfo.tickerid, res, stSma, barmerge.gaps_on, barmerge.lookahead_off) : 
  security(syminfo.tickerid, res, stSma, barmerge.gaps_off, barmerge.lookahead_off)) : 
  (htfMeth == "TF Conversion" ? (sma(htfstoch, convhtfperiodD)) : 
  (htfMeth == "Inputs" ? (sma(htfstoch, inphtfperiodD)) : 
  (na)))

//SIGNALS
htfstLong = htfstoch >= htfstSma and htfstoch <= stOB
htfstShort = htfstoch <= htfstSma and htfstoch >= stOS
//}
//SIGNALS ==> htfstLong, htfstShort

//HTF RSI
//{

//INPUTS
inphtfrsiLen  = input(240, "RSI Period", input.integer, group="HTF RSI")
inphtfusersiOBS = input(true, "Use RSI Overbought/Oversold Levels?", group="HTF RSI")

up1 = rma(max(change(rsiSrc), 0), inphtfrsiLen)
down1 = rma(-min(change(rsiSrc), 0), inphtfrsiLen)
buff = down1 == 0 ? 100 : up1 == 0 ? 0 : 100 - (100 / (1 + up1 / down1))


//CALCULATIONS

htfrsi = htfMeth == "Data Import" ? (gapsOn ? security(syminfo.tickerid, res, rsi, barmerge.gaps_on, barmerge.lookahead_off) : 
  security(syminfo.tickerid, res, rsi, barmerge.gaps_off, barmerge.lookahead_off)) : 
  (htfMeth == "Inputs" ? (buff) : 
  (na))

//SIGNALS
htfrsiLong = usersiOBS ? htfrsi <= rsiOB : htfrsi >= 50
htfrsiShort = usersiOBS ? htfrsi >= rsiOS : htfrsi <= 50

//}
//SIGNALS ==> htfrsiLong, htfrsiShort

//}

//*************** TRADING SESSIONS ***************//
//{

useSess = input(true, "Filter Trade by Session?")
whatSess = input("Custom", "What Trading Session? ", options = ["Custom", "Sydney", "Tokyo", "London", "New York"])
sessCust  = input("0500-1600", "Custom Session", input.session)

// InSession() determines if a price bar falls inside the specified session
InSession(sess) => na(time(timeframe.period, sess)) == false

sessSyd = "2200-0700"
sessTok = "0000-0900"
sessLon = "0800-1700"
sessNY = "1300-2200"

sess = whatSess == "Custom" ? (sessCust) : 
  (whatSess == "Sydney" ? (sessSyd) : 
  (whatSess == "Tokyo" ? (sessTok) : 
  (whatSess == "New York" ? (sessNY) : 
  (na)  ) ) )  
  
inSession = InSession(sess) //returns true if current bar is within desired session

//}

//*************** ENTRY RULES ***************//
//{

triggerLong = crossover(close, ema(close, 5))
triggerShort = crossunder(close, ema(close, 5))

goLong = triggerLong and inSession and maLong and stLong and rsiLong and macdLong and htfmaLong and htfstLong and htfrsiLong

goShort = triggerShort and inSession and maShort and stShort and rsiShort and macdShort and htfmaShort and htfstShort and htfrsiShort

//}

//*************** EXITS RULES  ***************//
//{

//HTF EXITS
//{

//Long Exits
htfExitStochLong = crossover(htfstoch, stOB) or crossunder(htfstoch, htfstSma) //STOCHASTIC
htfExitRsiLong = crossover(htfrsi, rsiOB) //RSI
htfExitMaLong = crossunder(htffastMa, htfslowMa) //MOVING AVERAGE CROSSOVER

//Short Exits
htfExitStochShort = crossunder(htfstoch, stOS) or crossover(htfstoch, htfstSma) //STOCHASTIC
htfExitRsiShort = crossunder(htfrsi, rsiOS) //RSI
htfExitMaShort = crossover(htffastMa, htfslowMa) //MOVING AVERAGE CROSSOVER

htfExitLong = htfExitMaLong or htfExitRsiLong or htfExitStochLong
htfExitShort = htfExitMaShort or htfExitRsiShort or htfExitStochShort
//}

//LTF EXITS (Optional)
//{

//INPUTS
useExStoch = input(defval=false, title='Stoch Exit', type=input.bool, inline = "exit1")
useExRsi = input(defval=false, title='RSI Exit', type=input.bool, inline = "exit1")
useExMa = input(defval=false, title='MA Exit', type=input.bool, inline = "exit2")
useExMacd = input(defval=false, title='MACD Exit', type=input.bool, inline = "exit2")

//Long Exits
exitStochLong = crossover(stoch, stOB) or crossunder(stoch, stSma) //STOCHASTIC
exitRsiLong = crossover(rsi, rsiOB) //RSI
exitMaLong = crossunder(fastMa, slowMa) //MOVING AVERAGE CROSSOVER
exitMacdLong = macdShort

//Short Exits
exitStochShort = crossunder(stoch, stOS) or crossover(stoch, stSma) //STOCHASTIC
exitRsiShort = crossunder(rsi, rsiOS) //RSI
exitMaShort = crossover(fastMa, slowMa) //MOVING AVERAGE CROSSOVER
exitMacdShort = macdLong
//}

//EXIT EXECUTIONS
//{
exitLong = 
  useExMa and useExMacd and useExStoch and useExRsi ? htfExitLong or exitMaLong or exitMacdLong or exitStochLong or exitRsiLong : 
  
  useExMacd and useExStoch and useExRsi ? htfExitLong or exitMacdLong or exitStochLong or exitRsiLong : 
  useExMa and useExStoch and useExRsi ? htfExitLong or exitMaLong or exitStochLong or exitRsiLong : 
  useExMa and useExMacd and useExRsi ? htfExitLong or exitMaLong or exitMacdLong or exitRsiLong : 
  useExMa and useExMacd and useExStoch ? htfExitLong or exitMaLong or exitMacdLong or exitStochLong :

  useExMa and useExMacd ? htfExitLong or exitMaLong or exitMacdLong : 
  useExMa and useExStoch ? htfExitLong or exitMaLong or exitStochLong : 
  useExMa and useExRsi ? htfExitLong or exitMaLong or exitRsiLong : 
  useExMacd and useExStoch ? htfExitLong or exitMacdLong or exitStochLong : 
  useExMacd and useExRsi ? htfExitLong or exitMacdLong or exitRsiLong : 
  useExStoch and useExRsi ? htfExitLong or exitStochLong or exitRsiLong : 

  useExMa ? htfExitLong or exitMaLong : 
  useExMacd ? htfExitLong or exitMacdLong : 
  useExStoch? htfExitLong or exitStochLong : 
  useExRsi ? htfExitLong or exitRsiLong : 

  htfExitLong

exitShort = 
  useExMa and useExMacd and useExStoch and useExRsi ? htfExitShort or exitMaShort or exitMacdShort or exitStochShort or exitRsiShort : 
  
  useExMacd and useExStoch and useExRsi ? htfExitShort or exitMacdShort or exitStochShort or exitRsiShort : 
  useExMa and useExStoch and useExRsi ? htfExitShort or exitMaShort or exitStochShort or exitRsiShort : 
  useExMa and useExMacd and useExRsi ? htfExitShort or exitMaShort or exitMacdShort or exitRsiShort : 
  useExMa and useExMacd and useExStoch ? htfExitShort or exitMaShort or exitMacdShort or exitStochShort :

  useExMa and useExMacd ? htfExitShort or exitMaShort or exitMacdShort : 
  useExMa and useExStoch ? htfExitShort or exitMaShort or exitStochShort : 
  useExMa and useExRsi ? htfExitShort or exitMaShort or exitRsiShort : 
  useExMacd and useExStoch ? htfExitShort or exitMacdShort or exitStochShort : 
  useExMacd and useExRsi ? htfExitShort or exitMacdShort or exitRsiShort : 
  useExStoch and useExRsi ? htfExitShort or exitStochShort or exitRsiShort : 

  useExMa ? htfExitShort or exitMaShort : 
  useExMacd ? htfExitShort or exitMacdShort : 
  useExStoch? htfExitShort or exitStochShort : 
  useExRsi ? htfExitShort or exitRsiShort : 

  htfExitShort
//}

//}

//*************** RISK MANAGEMENT  ***************//
//{
    
//Pip Calculator
//{

pip() => syminfo.mintick * (pow(10, pipMult))
DistanceToPip(_price1, _price2) => abs(_price1 - _price2) / pip()
//}

//INPUTS
//{
slPips = input(40, "Stop Loss In Pips", group = "Risk Management", minval = 1) * pip()

tslPips = input(40, "Trailing Stop In Pips", group = "Risk Management", minval = 1) * pip()
useTsl  = input(true, "Use Trailing Stop", group = "Risk Management")
tslOff = input(0, "TSL Offset", group = "Risk Management")

tpType = input("Pips", "Take Profit Calculation", options = ["Risk to Reward", "Pips"], group = "Risk Management")
rrr = input(2, "Reward - Risk Ratio", group = "Risk Management", minval = 0.5, step = 0.5)
tpPip = input(100, "Take Profit Pips", group = "Risk Management", minval = 1) * pip()
//}

//Calculation
//{
sl = slPips 

tsl = useTsl ? tslPips : na

tp = 
  tpType == "Risk to Reward" ? rrr * slPips :
  tpType == "Pips" ? tpPip :
  na
  
tslOffset  = tslOff >= 1 ? tslOff : na
//}


//}

//*************** STRATEGY EXECUTION (for Strategy) ***************//
//{
strategy.entry("Long", strategy.long, when = goLong)
strategy.entry("Short", strategy.short, when = goShort)


//Exit Method
if exMeth == "Both" 
    strategy.close("Long", when = exitLong)
    strategy.close("Short", when = exitShort)
    
    strategy.exit("Exit Long", from_entry = "Long", profit = tp, loss = useTsl == false ? sl : na, trail_points = useTsl ? tsl : na, trail_offset = tslOffset)
    strategy.exit("Exit Short", from_entry = "Short", profit = tp, loss = useTsl == false ? sl : na, trail_points = useTsl ? tsl : na, trail_offset = tslOffset)
    
else if exMeth == "Exit Rules" 
    strategy.close("Long", when = exitLong)
    strategy.close("Short", when = exitShort)
    
else if exMeth == "SL, TP, TLS" 
    strategy.exit("Exit Long", from_entry = "Long", profit = tp, loss = useTsl == false ? sl : na, trail_points = useTsl ? tsl : na, trail_offset = tslOffset)
    strategy.exit("Exit Short", from_entry = "Short", profit = tp, loss = useTsl == false ? sl : na, trail_points = useTsl ? tsl : na, trail_offset = tslOffset)


//}

//*************** PLOTS (for Study) ***************//
//{
    
plotshape(goLong, "Long", shape.triangleup, location.belowbar, color.lime, size = size.small)
plotshape(goShort, "Short", shape.triangledown, location.abovebar, color.maroon, size = size.small)

lastIsShort = barssince(goShort) < barssince(goLong)
lastIsLong = barssince(goShort) > barssince(goLong)

plotshape(lastIsShort ? exitShort : na, "Exit Short", shape.xcross, location.belowbar, color.lime, size = size.small)
plotshape(lastIsLong ? exitLong : na, "Exit Long", shape.xcross, location.abovebar, color.maroon, size = size.small)

//}

Overview

Cerebr Centauri Strategy evaluates trend conditions and oscillator states to generate trade signals and offers multiple position exit methods including exit rules, stop-loss, take-profit, and trailing stop levels. Plotted directly on the price chart, users can configure indicator periods and multi-timeframe calculation settings.

Details

Published by

jerryinyang on GitHub

Code credit

Cerebr, as written in the script's header

Type

Strategy, Pine Script v4

Draws

On the price chart

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Higher Timeframetimeframe240res
HTF Method?stringInputshtfMeth
Bar Merge On?boolfalsegapsOn
Position Exit MethodstringExit RulesexMeth
**Point-Pip Converter**int1pipMult
Moving Average SourcesourceclosemaSrc
Moving Average TypestringEMAmaType
Fast Moving Averageint5fLen
Slow Moving Averageint10sLen
Stoch Lengthint10periodK
Stochastic Lineint3smoothK
Stoch Signal Lineint3periodD
Show all 40 settings
SettingTypeDefaultVariable
Stoch Overboughtint80stOB
Stoch OverSoldint20stOS
RSI SourcesourceclosersiSrc
RSI Periodint9rsiLen
Use RSI Overbought/Oversold Levels?booltrueusersiOBS
RSI Overboughtint80rsiOB
RSI OverSoldint20rsiOS
MACD SourcesourceclosemacdSrc
Fast MACDint12macdfLen
Slow MACDint21macdsLen
MACD Signal Lineint9macdSig
Use MACD Decreasing Rule?boolfalseuseDec
Fast Moving Averageint80inphtfFLen
Slow Moving Averageint162inphtfSLen
Stoch Lengthint162inphtfperiodK
Stochastic Lineint48inphtfsmoothK
Stoch Signal Lineint48inphtfperiodD
RSI Periodint240inphtfrsiLen
Use RSI Overbought/Oversold Levels?booltrueinphtfusersiOBS
Filter Trade by Session?booltrueuseSess
What Trading Session? stringCustomwhatSess
Custom Sessionsession0500-1600sessCust
Stoch ExitboolfalseuseExStoch
RSI ExitboolfalseuseExRsi
MA ExitboolfalseuseExMa
MACD ExitboolfalseuseExMacd
Stop Loss In Pipsint40slPips
Trailing Stop In Pipsint40tslPips
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

330 stars

2 EMA/SMA + RSI Strategy [Alorse] combines three configurable moving averages with a short-period Relative Strength Index filter. It plots fast, slow, and trend moving averages on the price chart. Long entries trigger when the fast moving average is above the

Strategy v4 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of 2 EMA/SMA + RSI Strategy [Alorse]

Acrypto - Weighted Strategy

by AlbertoCuadra
318 stars

This strategy plots on the price chart and opens long or short positions when a weighted score from MACD, Stochastic RSI, RSI, Supertrend and a moving-average crossover exceeds a user-set trigger. Each component has its own weight and candle delay. Entries can

Strategy v5 TrendOscillators & momentum
Updated 3 years ago · Custom licence GitHub repository of Acrypto - Weighted Strategy

This strategy combines Arnaud Legoux Moving Average percentage price change calculations with an adaptive Gaussian Moving Average to generate trend-following signals. Long and short entries are triggered when the ALMA change calculation crosses above or below

Strategy v5 Moving averagesOscillators & momentum
Updated 7 weeks ago · None stated GitHub repository of ESM2024 - ALMA Smoothed Gaussian Moving Average
228 stars

This strategy generates trading signals based on a selectable momentum engine, supporting MACD, RSI, Stochastic, or Rate of Change. Entries trigger on signal crosses, zero-line crosses, or threshold crosses, with an optional moving average trend filter. Risk m

Strategy v6 Oscillators & momentumTrend
Updated 3 months ago · None stated GitHub repository of Momentum Strategy Template

255 EMA Strategy

by hasnocool
106 stars

255 EMA Strategy combines an exponential moving average with Average True Range bands and standard MACD crossovers to generate entry signals. Drawn directly on the price chart, it plots the central 255 EMA along with upper and lower volatility envelopes. Trade

Strategy v4 Moving averagesOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of 255 EMA Strategy

SMA RSI Strategy

by PythonForForex
64 stars

This strategy evaluates simple moving averages and the Relative Strength Index to generate trading signals. It calculates a 10-period SMA, a 30-period SMA, and a 14-period RSI. Long positions are entered when the fast SMA crosses above the slow SMA while RSI i

Strategy v5 TrendOscillators & momentum
Updated 4 years ago · None stated GitHub repository of SMA RSI Strategy

More Trend scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers