Best Nifty Strategy-Must Read

_SECTION_BEGIN("Price ");

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));
Sell=Cross(EMA( P, Periods),C);
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorCustom11);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorCustom12);

_SECTION_END();



PLease Help I need Code Here For Exit All position At End OF The Day (3.29) For Becktesting Please Please please Help
 
it seems like khushi leave this thread with the last word said by her "SORRY" actually she decided to leave thread at friday but the request of some senior members to keep posting she continues but she didn't active till 10.15 am.. upto 10.15 she replying continuesly with her views about nifty and trades done by her so congratulations (the persons who wanted her to leave this thread )

buddy no buddy ask her to leave she left herself . the only thing we were saying was tht this is a ganna thread and we should discus abt it
 

msa5678

Well-Known Member
How can I write this in AFL can U set It on AFl and post
IF u can Then Please Give
It is simple, Replace the buy and sell lines with the below lines.

Buy=Cross(C, EMA( P, Periods)) AND TimeNum()<150000 ;
Sell = Cross(EMA( P, Periods),C) OR TimeNum()>151500 ;
Short=Cross(EMA( P, Periods),C)AND TimeNum()<150000;
Cover=Cross(C, EMA( P, Periods)) OR TimeNum()>151500 ;



The above lines ensure that no trade is initiated after 03:00 and no trade is carried beyond 03:15 pm.


 
It is simple, Replace the buy and sell lines with the below lines.

Buy=Cross(C, EMA( P, Periods)) AND TimeNum()<150000 ;
Sell = Cross(EMA( P, Periods),C) OR TimeNum()>151500 ;
Short=Cross(EMA( P, Periods),C)AND TimeNum()<150000;
Cover=Cross(C, EMA( P, Periods)) OR TimeNum()>151500 ;



The above lines ensure that no trade is initiated after 03:00 and no trade is carried beyond 03:15 pm.


Thanks Thanks Thanks Thanks Thanks Dear

But I need All Trading Signal Till 3.29 And I want Clear My All Position At 3.30 only Its only For back test So of u can complete my 2 Condition In This AFL So please Help Condition is Here
1) I want All Call From 9.15am To 3.29Pm
Means I will get Fresh Buy ya Sell Signal From 1st candle Of day cause Yesterday position is clear by my 2 condition
2) I want Clear My All Open Position At 3.30 Pm Means :
If my Last Signal In Sell Before 3.30 Then I will get buy Signal At 3.30 pm And If my Last Signal Is buy Before 3.30 then i need Sell Signal At 3.30 pm

PLease site time Changing parameters if possible for other market
 
Last edited:
It is simple, Replace the buy and sell lines with the below lines.

Buy=Cross(C, EMA( P, Periods)) AND TimeNum()<150000 ;
Sell = Cross(EMA( P, Periods),C) OR TimeNum()>151500 ;
Short=Cross(EMA( P, Periods),C)AND TimeNum()<150000;
Cover=Cross(C, EMA( P, Periods)) OR TimeNum()>151500 ;



The above lines ensure that no trade is initiated after 03:00 and no trade is carried beyond 03:15 pm.


I want This code For Clear My Position
For Exmaple If my Position In sell Then I need buy signal at 3.15 Buy After adding your code in Formula I m Getting sell call only For Exit positoin means i want say At Evry 3.15 I m Geting Sell Signal only For Clear Position I need Buy Signal When My last position in Sell and When My Last position In Buy thet time i need Sell at 3.15 So please Check If u can Solve it Thnkas ones again dear
 
I will do it
hello readers, i have a best nifty strategy, belive it or not. I have been trading on it for last 4 months and got 78% returns on capital in 4 months although my capital size is not very big. And i didnt follow rules of stratgey due to fear ( no greed, only fear). If i had followed it strictly without fear, i could get more profit.
Even today on 9th august 2011, it gave buy above 4987 with just small sl of 4970. Almost everyday it works. If it fails then we initiate trade on other side of stop loss. There is hardly 1 or 2 days in month when sl of both sides hit. And sl are small less than 20 pts. Once the trade goes in our favor, we may revise sl to cost for rest qty by booking half qty in 20 pts profit or hold with origional sl depending on easy condition. For example if buy comes above 4987 and tgt is 5010, then at 5010 if price is below 20 ema, then revise sl at cost and if price is above 20 ema, then hold with origional sl. Vice versa for shorts.

So my point was that i want to make afl of this strategy. There is no point discussing, and wasting time with people about this strategy who criticise everything . Probably such people dont want even 18 pts sl in signle day of month. They want something magic system dircet from god. So i want to discuss and reveal strategy with people who are intelligent, and can make afl of this. You can later backtest it too, it really gave and still gives excellent profits. Afl writing masters can send me private msg, as i guess posting personal emails is not allowed on traderji. Thanks
 
I want This code For Clear My Position
For Exmaple If my Position In sell Then I need buy signal at 3.15 Buy After adding your code in Formula I m Getting sell call only For Exit positoin means i want say At Evry 3.15 I m Geting Sell Signal only For Clear Position I need Buy Signal When My last position in Sell and When My Last position In Buy thet time i need Sell at 3.15 So please Check If u can Solve it Thnkas ones again dear
write these lines at start
BarsToday = 1 + BarsSince( Day() != Ref(Day(), -1));

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

AND

Buy=(Cross(C, EMA( P, Periods) AND TimeNum()<150000) OR timenum() > 151500 ;
Sell = (Cross(EMA( P, Periods),C) AND TimeNum()<150000) OR timenum() > 151500 ;

Buy= ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
 
Last edited:
write these lines at start
BarsToday = 1 + BarsSince( Day() != Ref(Day(), -1));

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

AND

Buy=(Cross(C, EMA( P, Periods) AND TimeNum()<150000) OR timenum() > 151500 ;
Sell = (Cross(EMA( P, Periods),C) AND TimeNum()<150000) OR timenum() > 151500 ;

Buy= ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
Thanks Dear For Your Try But Your code Not Complete my Condition
Condition is Like
1) IF Price candle Close above EMA Then Buy Signal
IF price candle Close Below EMA Then Sell Signal
2) At End Of the Day Clear All Intraday position Like
If last call in buy Then Next call At End OF the day(3.15) Is Sell Signal
If last call in Sell then Next call at End Of the day(3.15) Is buy Signal
3) From Next day continue With 1)st Condition With 1st candle I mean If Yesterday Price Trend belove EMA And 2) Condition clear position With buy Signal at 3.15 Then If next Day Market Also Open Belove EMA So First candle Give Sell Signal And Then continue As 1) ,2),3)

If u can Complete this With My AFL Ya your Then Please Post Here Full AFL :)
 

Similar threads