Rutvik — Strategy by rutvikbaldha999

By rutvikbaldha999

Performance Metrics

Description

OVERVIEWA simple trend-following strategy built on the crossover of two Smoothed Moving Averages (SMMA, also known as Wilder's RMA). It is designed for intraday charts and automatically squares off all positions near the end of the trading session.CREDITSBased on the open-source "SMMA 5-13 cross" indicator by dimasfrolov (Mozilla Public License 2.0). This script adds strategy order logic, an intraday square-off and configurable arrow colors.HOW IT WORKS- Fast SMMA (default length 5, lime) and Slow SMMA (default length 13, red), both calculated on the close by default.- LONG: when the fast SMMA crosses above the slow SMMA. A green arrow is plotted below the bar.- SHORT: when the fast SMMA crosses below the slow SMMA. A red arrow is plotted above the bar.- The strategy is always in the market until square-off: an opposite cross closes the current position and reverses it.- Orders are filled at the open of the next bar (calc_on_every_tick is off), so there is no repainting of signals on closed bars.INTRADAY SQUARE-OFF- All open positions are closed at 15:15 (Asia/Kolkata by default).- No new entries are taken once a new order could not be filled before the square-off time.- Square-off only applies on intraday timeframes. Hour, minute and timezone are adjustable in the settings.SETTINGS- Fast / Slow SMMA length and source- Intraday square-off on/off, hour, minute, timezone- Buy / Sell arrow colorsBACKTEST PROPERTIES USED- Initial capital: 1,000,000- Order size: 1 unit (fixed)- Commission: 0.05% per order- Slippage: 1 tick- Margin: 15% long / 15% shortPlease adjust these to match your own instrument, lot size and broker before drawing any conclusions.NOTES AND LIMITATIONS- No stop loss, take profit or trend filter is included. In sideways markets, moving-average crossovers produce frequent whipsaws and losing trades.- Results depend heavily on the instrument, timeframe and trading costs. Past performance does not guarantee future results.- Backtest results are for educational purposes only. Use the strategy with proper risk management.DISCLAIMERThis script is for educational and informational purposes only and is not financial advice. Trading involves substantial risk of loss. Always do your own research and test on a demo account before trading real money.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView