Strategy Premise
Mean is the say last 10 days, would sum up the closing price of the stock in each of the 10 days. The sum total would then be divided by the number of days to get the arithmetic mean. And Recursion is a process in which a function calls itself a subroutine. This allows the function to be repeated several times
Envelopes are technical indicators that are typically plotted over a price chart with upper and lower bounds. The most common example of an envelope is a moving average envelope, which is created using two moving averages that define upper and lower price range levels.
Strategy Logic
Long Entry: When Price touches the lower band, Send LE.
Long Exit: Either when SL or Target is hit. If SL/TGT is not hit and Price touches Upper band send LX and SE.
Short Entry: When Price touches the Upper band, Send SE.
Short Exit: Either when SL or Target is hit. If SL/TGT is not hit and Price touches lower band send SX and LE.
Mean Recursion Envelop Strategy Parameters for TradingView Charts
Length(Mandatory): This is the number of bars used to calculated Ex: 14 à previous 14 candles are used.
Calibration Factor: calibration or response factor represents the slope of the line between the response for a given standard and the origin
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
1: Download The Pine Script Algo here
2: Open desired Chart in trading View with normal Candlestick, Select the desired timeframe of the chart, Go to the pine editor section, remove the default code, paste the downloaded code, save the file, and to chart.
3: You can optimize your strategy by changing the input parameters, using “Settings” of Mean Recursion Envelop Strategy.
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 popup alerts (TV free plan).
Recent Discussion