Strategy Premise
Moving Average (MA) can be an effective indicator. Many traders use Exponential Moving Averages (EMA). A very effective moving average indicator to trade in various markets, EMA gives more weighting or importance to recent price data.
To identify the predominant trend in the market, we use an Exponential Moving Average strategy (EMA Strategy). It can also provide the support and resistance level to execute your trade.
Strategy Logic
Long Entry: When Closing Price Crossover 21 Days EMA, Send LE
Long Exit: Either when SL or Target is hit. If SL/TGT is not hit and Closing Price Cross Under 21 Days EMA Send LX, SE
Short Entry: When Closing Price Cross Under 21 Days EMA , Send SE
Short Exit: Either when SL or Target is hit. If SL/TGT is not hit and Closing Price Crossover 21 Days EMA Send SX, LE
4 EMA Strategy Parameters for TradingView Charts
EMA Length : EMA lengths, such as 10-day, 50-day, and 200-day moving averages.
Intraday Trade Session: Entry Trade Will be Taken only in this session.
EXIT Session: Trades will be squared off in this timeframe
Quantity: This is used to specify the trade quantity
Custom Stop Loss in Points: Movement in chart price against the momentum which will trigger exit
Custom Target in Points: Movement in chart price against the momentum which will trigger exit
TradingView Settings
Follow the steps given below to start Algo-Trading with 4 EMA Algo-Strategy on TradingView to trade:
1: Download the Pine-Script Algorithm from here.
2: Open desired Chart in TradingView with Normal Candlestick. Then, select the desired timeframe of the chart. Go to the pine editor section and remove the default code. Paste the downloaded code. Save the file and chart.
3: Once Strategy is applied to the chart, click on settings to optimize parameters for your own trading.
Setting Up Alert
Before setting up an alert, make sure of few things. (1) You have selected the desired script, timeframe, and strategy settings. (2) API bridge is configured and running. Once you have made sure, click on settings. Then add alert and paste {{strategy.order.comment}} in the message box.
Important: Do not change any settings during live trading.
NOTE: The Pinescript works both with Webhook alerts (TV Pro plan) and Normal Pop-up alerts (TV free plan).
Recent Discussion