

"Momentum is on your side. Now's your window."





//@version=6
indicator('Cash Code X', overlay = true)
// --- Inputs ---
// MACD Settings
macdFastLength = input.int(24, title = 'MACD Fast Length')
macdSlowLength = input.int(52, title = 'MACD Slow Length')
macdSignalLength = input.int(9, title = 'MACD Signal Length')
[macdLine, signalLine, _] = ta.macd(close, macdFastLength, macdSlowLength, macdSignalLength)
// RSI Settings
rsiLength = input.int(14, title = 'RSI Length')
rsiOverboughtLongExit = input.float(75, title = 'RSI Overbought (Long Exit)')
rsiOversoldShortExit = input.float(35, title = 'RSI Oversold (Short Exit)')
rsiMidLow = input.float(40, title = 'RSI Mid Level Low (Filter)')
rsiMidHigh = input.float(60, title = 'RSI Mid Level High (Filter)')
rsiValue = ta.rsi(close, rsiLength)
// Filters
filterRSILongEnabled = input.bool(true, title = 'Enable RSI Filter for Long Entries')
filterRSIShortEnabled = input.bool(true, title = 'Enable RSI Filter for Short Entries')
// Filters
filterRSILongEnabled = input.bool(true, title = 'Enable RSI Filter for Long Entries')
filterRSIShortEnabled = input.bool(true, title = 'Enable RSI Filter for Short Entries')
// User Option to Enable Short Signals
enableShortSignals = input.bool(false, title='Enable Short Entry Signals')
// --- Entry Conditions ---
macdLongEntry = ta.crossover(macdLine, signalLine)
macdShortEntry = ta.crossunder(macdLine, signalLine)
rsiLongFilter = not filterRSILongEnabled or (rsiValue > rsiMidLow and rsiValue < rsiMidHigh)
rsiShortFilter = not filterRSIShortEnabled or (rsiValue > rsiMidLow and rsiValue < rsiMidHigh)
longEntry = macdLongEntry and rsiLongFilter
shortEntry = enableShortSignals and macdShortEntry and rsiShortFilter
// --- Plotting Signals ---
plotshape(series = longEntry, title = 'Long Entry', location = location.belowbar, color = color.green, style = shape.triangleup, size = size.small)
plotshape(series = shortEntry, title = 'Short Entry', location = location.abovebar, color = color.red, style = shape.triangledown, size = size.small)// --- Alerts ---
alertcondition(longEntry, title='Long Entry Alert', message='MACD & RSI Long Entry Signal')
alertcondition(shortEntry, title='Short Entry Alert', message='MACD & RSI Short Entry Signal')





Start using the Perfect Timing Indicator to turn hesitation into a repeatable edge: defined entries, disciplined exits, and no more "is now the time to buy?" guess work.