Best Nifty Strategy-Must Read

msa5678

Well-Known Member
This problem is because of the ExRem() in the AFL. As you are forcing a SELL in the end bar, the next SELL can only appear after a BUY signal. This is because, the ExRem() removes consecutive BUY or SELL signals and makes them appear alternately.

-Anant
Dear Anant,

Thanks for the clarification. You have analysed the AFL wonderfully, I was assuming the error to be because of the first line of the code ""StartBar = ValueWhen(TimeNum() == 091500, BarIndex());
"" But it seems it is not because of that.

I have followed some of your AFL's and appreciate your clarity in framing the code and knowledge of AFL.

Regards
 

jallanankit

Well-Known Member
lets take today as an example. for most of the time nifty was hovering around 4650. so we should take into consideration the sum total of the premiums of 4700 CE and 4700PE for December. if the sum total is greater than Rs.300, then its expected to b a trending market. In case the sum total is less than Rs.300(which was the case in November) then it is safe to assume that the markets would be range bound...I have been using this principle for the past 3 years and till date its really very accurate...All the best everybody :)
Some queries to b answered by u...

1. Why 300?? This is being asked because in the beginning of the month, the time value in options is high, so 300 level can b reached but with passage of time, TV will decrease continually, i dont undersatnd how do u calculate the trend this way...?? Pls clarify...

2. Today was the last day of november series so, why is december data considered.. Reason for it??

Pls answer to both...
 

msa5678

Well-Known Member
:)

Dear I Feel So i type Here
What about AFL Its Done Means u remove This Problem Or NOT ????

:):):):):):):)
Changing the TimeNum to 152800 sorts the problem. The corrected version is this...


Code:
_SECTION_BEGIN("Price ");

BarsToday = 1 + BarsSince( Day() != Ref(Day(), -1));

StartBar = ValueWhen(TimeNum() == 091500, BarIndex());


Plot(C, "", IIf(C > O, colorBrightGreen, colorRed), ParamStyle("Price Style", styleCandle, maskPrice));

Title = FullName()+" - "+Name()+"\nO:"+O+", H:"+H+", L:"+L+", C:"+C;
_SECTION_END();

_SECTION_BEGIN("EMA");

P = ParamField("Price field",-1);
Periods = Param("Periods", 20, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); 

Buy = Cross(C, EMA( P, Periods))  OR C>EMA( P, Periods) OR TimeNum() > 152800  ;
Sell = (Cross(EMA( P, Periods),C))  OR  C<EMA( P, Periods) OR TimeNum() > 152800;

Buy= ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy); 



PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBlack); 
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorBlack);

Short=Sell;
Cover=Buy;
PositionSize = MarginDeposit = 1;

_SECTION_END();
 
@asnavale ji,
:clapping:please pm me your y id I will be in touch with you for your calls and also connect with your id . If you please provide me the info how you calculated the calls yesterday 35+75 points profits it will be very much appreciated.
 
Some queries to b answered by u...

1. Why 300?? This is being asked because in the beginning of the month, the time value in options is high, so 300 level can b reached but with passage of time, TV will decrease continually, i dont undersatnd how do u calculate the trend this way...?? Pls clarify...

2. Today was the last day of november series so, why is december data considered.. Reason for it??

Pls answer to both...
I'l answer first questions first. The amount Rs. 300 has been arrived at after 3 years of observation.there is no technical principle supporting it. just a mere observation. what happens is that whenever the market is trending, the premium would be higher mainly for the fact that the volatility is expected to be high...whenever the markets are expected to be range bound, the premiums would be comparatively lower...as was the case in the month of November,2011.
Second Ques.: yesterday was the expiry, hence December data was taken into consideration coz today onwards we would be dealing in December expiry nifty.
Pls Note:
Option Premium= Time Value+ Intrinsic value
Time value= Volatility+ Time to expiry
In nutshell, when the time to expiry is maximum and the volatility is expected to be high the option premiums in the BEGINNING of the month would be high...and vice versa...
That is why yesterday's premium values for the month of december were taken into consideration...
 

Similar threads