Best Nifty Strategy-Must Read

hitesh

Active Member
#41
Ploting Level manually - AFL

_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();


///////////// Resistance ///////////////
B1 = Param("Buy Avove", 5148.06,0,6500,0,0);
Plot( B1,"R1",colorGreen,styleLine);

R1 = Param("Resistance 1", 5163.43,0,6500,0,0);
Plot( R1,"R1",colorBlue,styleLine);

R2 = Param("Resistance 2", 5181.40,0,6500,0,0);
Plot( R2,"R2",colorBlue,styleLine);

R3 = Param("Resistance 3", 5199.41,0,6500,0,0);
Plot( R3,"R3",colorBlue,styleLine);

R4 = Param("Resistance 4", 5217.45,0,6500,0,0);
Plot( R4,"R4",colorYellow,styleLine);


///////////// Supports ///////////////
Sa1 = Param("Sell Below", 5130.14,0,6500,0,0);
Plot( Sa1,"Sa1",colorRed,styleLine);

s1 = Param("Support 1", 5114.8,0,6500,0,0);
Plot( s1,"S1",colorPink,styleLine);

s2 = Param("Support 2", 5096.93,0,6500,0,0);
Plot( s2,"R2",colorPink,styleLine);

S3 = Param("Support 3", 5079.41,0,6500,0,0);
Plot( S3,"S3",colorPink,styleLine);

s4 = Param("Support 4", 5061.29,0,6500,0,0);
Plot( s4,"s4",colorYellow,styleLine);

Note : AFL corrected. As AFL posted earlier was not accepting maximum values beyond 100.
 
Last edited:
#42
Levels are calculated correctly

First trade generated at 9.21 am which reached target 5163.43( one can not took the trade as it was before 9.29 so VWAP not determined)

Second Buy came at 9.51 which resulted in SAR at 10.09 ( Loss)

Third trade 11.05 am SAR at 5148 (Loss)

Fourth trade buy 5148 is on ...

In my opinion roughly 1:1 RR is risky in a index like Nifty.
Just now I checked the chart,I found only two trades as per this strategy.first at 10 which was in loss and second at 11.05 which hit the target.
 

myamit

Well-Known Member
#46
Thanks Myamit

thanks alot for giving your time. We will wait eagerly for you to finish this AFL asap. :clapping:
Hello Rajvir,

Please check your PMB. I've sent AFL code there. I'm not publishing here as this code requires lot of refining before one can use it for practical trading or backtesting.

Below is the summary of what I've coded...

1. VWAP calculation (I've made quite a few changes here. I could not understand your VWAP code & again it is very very slow. May not work in realtime).

2. GANN levels calculations (no need to manually defining any levels now). All levels are auto calculated & hence this code can be used for any stock or index.

3. Defined entries (buy or short). Also exits (either SL or upon Profit target)

4. Info box to display all actions (what to do) & levels in real time

Now I'm focusing on following...

-- Adjusting signals (what if both signals are on the same bar), in 5 minute time frame it is quite possible that Buy & Short both signals are being generated on same bar. Advice what exactly you wish to do for such scenario.

-- Set Buy/Short price to (Buy/Short +1) instead of close of the candle (by default, Amibroker execute all instructions at close of candle)

-- Multiple levels of resistance or support (for profit booking)
This is very important consideration. We need to define exit (when profit target is achieved). We can not be tentative (like see whether price is staying above target1 for few minutes etc.) but need to have clear rule for exit. Please advice. Currently, AFL is exiting upon achieving first target.

-- reentry limits (how many, when & how)
Please also define exact rule for re-entry. This should be like when to reenter, how many time to reenter etc.
Also while re-entering, should we use the same VWAP value or latest VWAP value or LTP (please let me know your rule here)

-- Square off by end of day | no position on new day
Also I assume that any position taken should squared off on the same day. No carrying any open position overnight.

-- Plot buy/short shapes
Once I've clear rule of entry/exit, reentry etc., I'll plot buy/sell arrow & also backtest on Nifty (plus any stock that you may wish). I've intraday data of one year & EOD data of 15 years.

Also, I wish to draw your attention that your basic premise that small change in VWAP is fine & may not affect overall results. However this is not true. Please understand that GANN levels are placed at quite small intervals roughly around 15-17 points for Nifty's current range. For smaller price stock it may be very near to each other (roughly it is at 0.015% distance).
Like today's case if we take VWAP at 1 min candle entry levels are one step different. So target will become buy above and so on. Think this thru & let me know your experiences.

Please let me know your feedback & answers to above queries as well.

At the end, I must say that I've really enjoyed this task.
 

myamit

Well-Known Member
#47
Hello Rajvir,

I had one more query...

Based upon VWAP formula, today VWAP (for Nifty future) at 9:29 was

VWAP = 5144.56
Buy above: 5148.06 Targets: 5163.43 - 5181.4 - 5199.41 - 5217.45
Sell below: 5130.14 Targets: 5114.8 - 5096.93 - 5079.1 - 5061.29

Now LTP at this point (at 09:29) was 5164.
Please advice how do you trade on such a variations? Or you should wait price to go down first & than come back. I'm little confused.

Thanks.
 
#50
one important rule i m following from last 4 years, is concentrate on this gann system only. u will always remain happy and tension free

Dear Ramshirsathji

Apki success ki Raj bataiye please.

Explain the merits & demerits , how you tackled the same & made consistent profit last four years if this is not a proprietary secret.

Hum bhi happy and tension free rehna chahte hai.

:thanx:
 

Similar threads