TradingView
ThePartTimeNSE
7 de Oct. de 2021 5:16

AMRS_LongOnly_PartTimer 

HDFC BANKNSE

Descripción

This Script is created to back-test the data starting 01/01/2000 based on AMRS strategy.

AMRS is long only strategy. It is based on unique calculation around moving averages and 2 year high price.

There are few strategies for moving average crossovers but AMRS strategy is unique compared to other moving averages strategies as it has very specific below mentioned calculations evolving around moving average and stock price.

AMRS strategy is unique one to generate buying signals when stock price creates new 2 year high and retraces back to 13 day EMA value.
AMRS strategy is unique one having specific calculation for entry signal and exit signal as mentioned below. This strategy gives back testing results to help build conviction on entry/exits if trades were taken in past as per the AMRS rules.

As per AMRS strategy this script generates green arrow on each time when new 2 year high is made and also generates long signal indicated by white arrow when stock price retraces back to 13 day EMA value and price is within 10% range from 2 year high.
This strategy will generate white arrow on the chart for each buy signal when stock price reaches 13 day EMA after first Long signal is generated. These subsequent buy signals can be used for pyramiding.

Entry Signal Logic : 1. Stock should be trading near 2 year high.
2. Stock price should be within 10% range from 2 year high
3. Stock price should be less than or equal to 13 day EMA and grater than equal to 21 day EMA

This AMRS strategy also generates exit signal for already generated buy signal (open position).

Exit signal generated when stock price closes 5% below 21 day EMA or when stock price closes below 20% from most recent 2 year high price.

Exit Signal Logic : 1. Stock price closes 5% below 21 day EMA or stock price closes below 20% from most recent 2 year high price.
2. Since exit logic is based on closing price it is plotted on the chart next day.
3. So when exit signal is plotted on the chart, previous days stock price is either closed below 5% of 21 day EMA or corrected 20% from recent 2 year high.

Note : To Calculate last entry positions % return, by default all positions are getting closed on mentioned end date.

Script parameters :

start date as 01/01/2000 - Constructed from Start Year - 2000, Start Month - 1 Start Date - 1
End date (mostly current date) Constructed from Values in End Year, End Month, End Date.
Initial Capital - Defaulted to 100000
Order Size - 5% of Equity
Pyramiding - 3 orders
Commission - 0.2%
Slippage - 1 tick (Since this strategy exit is on close basis mostly there wont be any slippages)
Comentarios
Medico-Trader
I had a doubt about close position order. It shows after almost every long position buy call at the immediate next candle. What does it mean?
ThePartTimeNSE
@nrkanitkar97, it should not show like that. Which stock you are checking? Make sure to set end date properly in the setting as mentioned in description of strategy
Medico-Trader
@ThePartTimeNSE, hi thanks got it! 🙂 So we have to keep the start date as it is and change the end date everyday right?
Also I had a few doubts but let me ask one example. In ALLCARGO chart, there was a long +1 call on 11th November 2020 even if the price hadn't closed between 13 and 21 EMA. Whereas on 12th July 2021, there was no buy call even if the price had closed between 13 and 21 EMA on the previous day, as you had explained in Vivek sir's session. Why so? Thanks in advance 👍🏻
ThePartTimeNSE
@nrkanitkar97, Yes we need to change end date everyday. I am glad you are doing some very good observations and asking good questions. AMRS strategy is plotting white arrows (Buy Signal) whenever entry rule is met and price enters between 13 and 21 day EMA. So On All cargo chart we have white arrow on 10-dec-2020. Long + signal is plotted next day 11-dec-2020 just to star recording return performance for strategy result. On 12th July 2021 price did not come between 13 and 21 day EMA that's why no white arrow. Rather we have white arrows on 7, 8, 9 July as price was between 13 and 21 day EMA.

Exit signal is also plotted next day because rule is using closing price for exit.

Bottom line I use white arrows for entry signals.
Medico-Trader
@ThePartTimeNSE, thanks a lot for the prompt replies 😊 amazing strategy 💯 . Actually I missed the white arrows because my background is white 😂 changed the colour now and it all makes sense now, thank you 👍🏻
ThePartTimeNSE
@nrkanitkar97, Good Point, I did not realize it.. I will update script description
vivekagarwal1969
Hi Thx for your wonderful system. I have recently gone through your video on Elearnmarket and have started following you. I have couple of queries on your indicator.
1. What does Blue Arrow means. It is mentioned on chart as long but I do not find any reference to this in your video.
2. What does Pink arrow ( close position indicated). Is it and exit criterion. But in this example of HDFC Bank, your exit criterion is still not met while chart indicates to close position.

Thx in advance and Kudos to you for all the good work.
jkarekar23
Thank you sir
jaimalviya2233
Excellent indicator sir
Más