Happy Dairy - Part 2


Hope everyone enjoyed today's trading . . .

What a day with one sided trend from the first bar . . . :thumb:

The best part no opening gaps, we got a chance to participate on the entire run :D

We traders keep praying for a day like this . . . ;)

BNF kept falling even after all the S/R line marked got exhausted . . . :lol:

:) Happy
BNF is having greats swings from expiry to expiry . . .

Lets see what October has to offer positional / swing traders . . .

For now in October we should start with a short position created at yesterdays close or just after today's Open . . .

:) Happy

EDIT: I won't classify this type of trade as either positional or Swing
This is based on daily time frame, but here we just try to look for opportunity to grab points from an established trend
Not trying to catch any reversals or trading the moves end to end . . .


The Stops are now at BE so the trade becomes risk free . . . I will not be moving/trailing the stop any further . . .
The trade needs room if it has to move, if it reverses we give back the notional gains and try to get back on to the next
Last edited:
Lower time frame chart . . . (30 Mins)

Yesterday on expiry the premium on BNF was approximate 110 points. . .

this creates an illusion on the BNF charts, if someone is following the spot prices his trend will be different than that of someone using continuous futures charts . . .

:) Happy
The Fool's Gold​
System Optimization is looked at as a gold hunt by many traders.

Testing 1000s of variable and 100s of assumptions . . . It invariably turns out to be curve fitting exercise . . .

Give me few indicators and a set of tick data and I can fit a Holy Grail System for 'that set of Historical Data' :D

Here is an Optimization framework to test a System using just one Single MA ...
Amibroker users can test it to find the best fit :lol:

_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", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 

y = Optimize("PERIOD",Param("PERIOD",90,10,200,10),10,200,10);
z = Optimize("MAType",Param("MAType",2,1,8,1),1,8,1);
x = Optimize("TRules",Param("TRules",1,1,3,1),1,3,1);

m=0;	if (z==1) m	=	MA(C,y);	
else	if (z==2) m	=	EMA(C,y);	
else	if (z==3) m	=	DEMA(C,y);	
else	if (z==4) m	=	TEMA(C,y);	
else	if (z==5) m	=	WMA(C,y);	
else	if (z==6) m	=	HMA(C,y);	
else	if (z==7) m	=	Wilders(C,y);	
else	if (z==8) m	=	LinearReg(C,y);
Plot(m," MA",IIf(m < Ref(m,-1),colorBlue,colorRed),styleThick);
		if (x==1) {UP = C > m;						DN = C < m;}
else	if (x==2) {UP = m > Ref(m,-1);				DN = m < Ref(m,-1);}
else	if (x==3) {UP = C > m AND m > Ref(m,-1);	DN = C < m AND m < Ref(m,-1);}

Buy  = UP AND NOT (DN);
Sell = DN AND NOT (UP);
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
Short = Sell; Cover = Buy;

As this kind of optimization depends solely on the data set, it highly unlikely that the same data pattern will be repeated, so the results will not be the same . . .

But this kind of testing can be useful . . . suppose during these optimization runs a trader bothers to observe what kind of combinations are frequently showing up
for e.g. is price closing above the MA more effective than the slope or both combines together are giving better performance . . . .

So is there a pot of gold at the end of the rainbow . . . :thumb:


:) Happy
BNF Daily Chart for 2013 after optimization using above AFL, guess what is the Result?

Only 4 Trades with optimum juice squeezed out of it . . . :rofl:

But all is not wasted . . . :lol:

As I said above these tests can also be useful . . .

it is interesting to see what happens when you change the rules just a slight bit . . .

For e.g. use . . . High & Low instead Close in the above equations and see how things work out,

so now we know for taking entries, if we should wait for close of a candle . . .which is more effective . . . :thumb:


:) Happy
Last edited:
BNF Daily Chart for 2013 after optimization using above AFL, guess what is the Result?
Parameters optimisation has a danger that it looks great on the sample data ( because of optimisation ) and it may do poorly when out of sample tests done. So it is better to select parameters which give satisfactory results over many different data samples. That makes the system more robust.

My 2 cents from my experience of optimisation from my early years.

Thread starter Similar threads Forum Replies Date
S Welcome 3
MSN1979 Swing Trading 1
DayTrader007 General Chit Chat 5
tkamal General Chit Chat 2
Happy_Singh Trading Diary 236

Similar threads

Zerodha – Open Paperless Account

Open online account with Zerodha. Free delivery trading and Max Rs 20 for Intraday, F&O, Currency and Commodity Trading. Intraday High leverage with MIS, CO and BO.

Are you a day trader?