My Nifty/Mini-Nifty Positional trade logs

Can Stochastics indicator alone be used for positional trading?


  • Total voters
    50

summasumma

Well-Known Member
The Excel sheet for the required chart for this method can be downloaded from here --->
Excel Sheet

@hmp, if you are referring to the AFL which generated signals in amibroker chart posted few post before, then this is the code for the same:
But remember, i dont take trade only based on this buy/sell signal for ami all the time. Some signals/trades might be ignored due to obvious reason in the system. But yes, almost 75% of the time, this AFL holds good.

Code:
pds1 = 15; /*Periods */
slw1 = 9; /*Slowing for Full Stoch%K*/
slwd1 = 1; /*Slowing for Full Stoch%D*/

pds2 = 21; /*Periods */
slw2 = 1; /*Slowing for Full Stoch%K*/
slwd2 = 1; /*Slowing for Full Stoch%D*/

pds3 = 8; /*Periods */
slw3 = 1; /*Slowing for Full Stoch%K*/
slwd3 = 1; /*Slowing for Full Stoch%D*/

pds4 = 15; /*Periods */
slw4 = 3; /*Slowing for Full Stoch%K*/
slwd4 = 1; /*Slowing for Full Stoch%D*/

FSK1 = 100*(C-LLV(L,pds1))/(HHV(H,pds1)-LLV(L,pds1)); // FASTSTOCHK
FLSK1 = MA( FSK1, slw1 ); // FULLSTOCHK
FLSD1 = MA( FLSK1, slwd1 ); // FULLSTOCHD

FSK2 = 100*(C-LLV(L,pds2))/(HHV(H,pds2)-LLV(L,pds2)); // FASTSTOCHK
FLSK2 = MA( FSK2, slw2 ); // FULLSTOCHK
FLSD2 = MA( FLSK2, slwd2 ); // FULLSTOCHD

FSK3 = 100*(C-LLV(L,pds3))/(HHV(H,pds3)-LLV(L,pds3)); // FASTSTOCHK
FLSK3 = MA( FSK3, slw3 ); // FULLSTOCHK
FLSD3 = MA( FLSK3, slwd3 ); // FULLSTOCHD

FSK4 = 100*(C-LLV(L,pds4))/(HHV(H,pds4)-LLV(L,pds4)); // FASTSTOCHK
FLSK4 = MA( FSK4, slw4 ); // FULLSTOCHK
FLSD4 = MA( FLSK4, slwd4 ); // FULLSTOCHD


sst = FLSD1;
fst = FLSK2;
fst2 = FLSK3;
compstoch1531 = FLSK4;


MaxGraph = 5;
Graph0 = FLSD1;
Graph0Color = 4;
Graph1 = FLSD2;
Graph1Color = 6;
Graph2 = FLSD3; 
Graph2Color = 19;
Graph0Style = Graph1Style = Graph2Style  = 1;
Graph0Name = "(15,9,1)";
Graph1Name = "(21,1,1)";
Graph2Name = "(8,1,1)";

Ob=80;
Os=20;
Graph3 = Ob;
Graph4 = Os;



_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} {{VALUES}}"));
/*Title = Name()+"   "+FullName()+
"   FastStoch%K=Yellow  FullStoch%K = Blue  FullStoch%D = Dark Grey";
*/

when_fast_go_above_slow = (fst > sst); /* fast_stoch(21,1,1) is above the slow_stoch(15,9,1) */
when_fast_go_below_slow = (fst < sst); /* fast_stoch(21,1,1) is below the slow_stoch(15,9,1) */

PositionSize = MarginDeposit = 1; /* to trade one contract only */
PointValue = 50; /* lot size per contract */

slowstoch_cur_gt_prev = ( sst > Ref(sst,-1) );
slowstoch_cur_lt_prev = ( sst < Ref(sst,-1) );

faststoch_cur_gt_prev = ( fst > Ref(fst,-1) );
faststoch_cur_lt_prev = ( fst < Ref(fst,-1) );


compstoch1531_cur_gt_prev = ( compstoch1531 > Ref(compstoch1531,-1) );
compstoch1531_cur_lt_prev = ( compstoch1531 < Ref(compstoch1531,-1) );


faststoch_2_cont_high = (  (fst > Ref(fst,-1)) AND (Ref(fst,-1) > Ref(fst,-2))  );
faststoch_2_cont_low =  (  (fst < Ref(fst,-1)) AND (Ref(fst,-1) < Ref(fst,-2))  );

faststoch2_2_cont_high = (  (fst2 > Ref(fst2,-1)) AND (Ref(fst2,-1) > Ref(fst2,-2))  );
faststoch2_2_cont_low =  (  (fst2 < Ref(fst2,-1)) AND (Ref(fst2,-1) < Ref(fst2,-2))  );


Buy  =  faststoch2_2_cont_high AND (fst2 > 20) AND (fst > 20) AND (compstoch1531>16);
Sell =  faststoch2_2_cont_low AND (fst2 < 80) AND (fst < 80) AND (compstoch1531<84);

Short = faststoch2_2_cont_low AND (fst2 < 80) AND (fst < 80) AND (compstoch1531<84);
Cover = faststoch2_2_cont_high AND (fst2 > 20) AND (fst > 20) AND (compstoch1531>16);
 

summasumma

Well-Known Member


3291, 2191came down...
(15,3,1) went UP and came out of OS zone...
2111, 811 went UP ...

Exited [email protected]@5360 ... 3 points Profit...

Entered Long today @ 5360...
as 1531 started moving up and 811/2111 moving up consecutive 2 days.
 

summasumma

Well-Known Member
summasumma ji,
could u please share ur 1st afl which is showing buy sell arrow on price? If possible...

One more thing...I have downloaded ur excel file ...but it is updateed till 6th june...how to update the rest?

Thanks in advance?
The AFL posted in 5-6 posts before this post is the one which shows arrows...
The arrows appeared in the chart as i performed backtesting using amibroker and enabled the "show arrows for actual trades" option.

The Excel is not updated after that as i started adding OHLC in amibroker.
But its very simple to update the excel sheet just by copy pasting the lastline as i specified in the earlier post and update the OHLC values. You can take the leftout nifty OHLC historical values from the following link:
http://www.nseindia.com/live_market...ument=FUTIDX&expiry=27SEP2012&type=-&strike=-

Export the data as excel-sheet from the above link and copy paste at the end of our excel sheet.
 

summasumma

Well-Known Member
In last 2 trades i had opportunities where position was in 100 points profit but still didn't booked and exited trades almost in same entry price with breakeven.

This trade entered 2 lots and booked 1 lot nifty now @ 5450 just to realize some profits and don't regret later. 90*50 profit :clap:
Lets see if i still regret later for booking little early... :D

holding other lot to follow with strategy...
 

Similar threads