Sounding Board and Random Brainstorming

arsh22g

Well-Known Member
#21
Being Specific to your post.
If LL or HH not getting printed in a particular period, volatility is low
yes that has everything to do with it.
acceleration is almost nil
if there ain't no volatility there is no acceleration even a puny high break needs volatility and market movers,but i don't think it has to be a strong move(accelerated) to be a volatile hour.
Suddenly, when market breaks out, acceleration increases in that direction and we take trade
We take trade when we get a go signal by breakout yes,which mostly happen around same hour each day,there effect lasts the whole day.
It's different from momentum as there is a time component.
Yes momentum is related with speed and we humans gauge speed with time so you relate both of them,i see a big 100 point bar i would still call it momentum,yeah time is also related to it,how much time it took for that thing,but mind you we are not taking into consideration the hour of action, we are just clocking speed in case of momentum.

Regards
We can gauge this manually from charts, but I think it becomes difficult in algo. My goal is to develop an algo for intraday, and everything that I have tried till now gives very good swing results, but bad intraday results. Partial reason is that trend changes a lot on shorter TF, and standard trend following systems give a lot of whipsaws on shorter TF. A manual look at the charts gave me this idea of acceleration.

I want to capture sharp turns using acceleration. Just HH and LL may give wrong signals, only a change in the direction of acceleration during a certain # of bars will confirm this change, and hence to a better trade. I will try it on Excel first because I am not good at coding. Will share in pictorial form if something interesting turns up.
 

arsh22g

Well-Known Member
#22
@ TAVNAZ


here i tried to just elaborate wht flux system is.

look for the first 5 days and i noted it's over all cycles with back lines.
then by looking at the averages of occurrence of reversal points at the bottom created future prediction of the day. or simply i tried to predict future reversal points.
this Flux system.

Hope this helps....
and some what this type of analysis u deed. And i appreciate that keen observation.
I think taking continuous days for prediction is wrong, because market undercurrents are not same everyday and the information moving it also varies. On the other hand, if we try to identify the days where similar type of info is flowing and then bunch them together, then a prediction makes more sense.

E.g. Just before Crude inventory data release, Crude tends to be volatile. If we can bunch together such days and try to identify a certain range (not necessarily in terms of points, could be related to anything but translated to points in the end) in which Crude tends to trade, we can take rangebound trades.

It's easier to trade trending days, where such a system may not add any value. Isn't it?
 

extremist

Well-Known Member
#23
it is just for ur understanding i plotted 5 days else u can select as many days u can.

Or u want me to draw some more days......:lol: just joking.

and it is not based on mare comparison of last few days.

it is just the stastical prediction of reversal points

plz visit the thread or site for better undrstanding
 
Last edited:

Tavnaz

Well-Known Member
#24
We can gauge this manually from charts, but I think it becomes difficult in algo. My goal is to develop an algo for intraday, and everything that I have tried till now gives very good swing results, but bad intraday results. Partial reason is that trend changes a lot on shorter TF, and standard trend following systems give a lot of whipsaws on shorter TF. A manual look at the charts gave me this idea of acceleration.

I want to capture sharp turns using acceleration. Just HH and LL may give wrong signals, only a change in the direction of acceleration during a certain # of bars will confirm this change, and hence to a better trade. I will try it on Excel first because I am not good at coding. Will share in pictorial form if something interesting turns up.
Care to elaborate on the highlighted part.
What seem to be the hurdle?
I have a general rule of trading.
I never trade both ways in intraday trading.
The breakout hour and behavior of corresponding hour is a dead give away as to what kind of day it will be,this i learn't through lot of hardships.
I mark the line where first breakout in the day happens.
When next range happens during non volatile hours i mark another line at the base and top of that range,if it breaks below base only then i consider short.
If it breaks above the high of top of range i hold.
I never ever anticipate the trend formed by morning breakout will fade away.
In my opinion people don't realize the pivot method of marking every mph and mpl can lead to a lot of fake signsls if market is not going up or down that sharply,pehaps a filter needs to be added in place for you to be able to filter what kind of trend is there.
I ignore some highs/lows when i use a standard line break trend change method,i will elaborate more on when i hear from you regarding the highlighted part of your post.
Regards
 

Tavnaz

Well-Known Member
#25
it is just for ur understanding i plotted 5 days else u can select as many days u can.

Or u want me to draw some more days......:lol: just joking.

and it is not based on mare comparison of last few days.

it is just the stastical prediction of reversal points

plz visit the thread or site for better undrstanding
your example was spot on no need to do (highlighted)that.haha
Although i will voice my opinion against,expecting reversal before hand.
I have other reasons too like Support resistance are best played when we trade them as break hold play,i am never a fan of reversal entries with S/R as they are always countertrend.Yet most people think that is all S/R are used for.
Coupling the info of what hour it is with S/R stuff may give chances of catching good reversals,but that info can also be used to take profit and staying away from market while we know a certain hour is going to be a range.
Everything said ,nice contributions.
Regards
 

arsh22g

Well-Known Member
#26
Care to elaborate on the highlighted part.
What seem to be the hurdle?
I have a general rule of trading.
I never trade both ways in intraday trading.
The breakout hour and behavior of corresponding hour is a dead give away as to what kind of day it will be,this i learn't through lot of hardships.
I mark the line where first breakout in the day happens.
When next range happens during non volatile hours i mark another line at the base and top of that range,if it breaks below base only then i consider short.
If it breaks above the high of top of range i hold.
I never ever anticipate the trend formed by morning breakout will fade away.
In my opinion people don't realize the pivot method of marking every mph and mpl can lead to a lot of fake signsls if market is not going up or down that sharply,pehaps a filter needs to be added in place for you to be able to filter what kind of trend is there.
I ignore some highs/lows when i use a standard line break trend change method,i will elaborate more on when i hear from you regarding the highlighted part of your post.
Regards
The highlighted part is only relevant if we consider an autotrading system which identifies trends and takes trades based on that. What you said further is absolutely true, but I struggle in coding that into an auto system. It will be great if I can achieve that, till then it's experimentation with some simpler systems, but such systems give good results in swing and go haywire in intraday. Although if doing manually, I would also tend to do something similar to what you mentioned.
 

copypasteaee

Humbled by Markets
#27
I have one idea.
I need any AFL (MA crossover, Stoch, rsi....) which will give 70-80% loss (more is better:D).

Now I will revert all the signals generated by that AFL.:p
even if you revert he signals then too it will give loss. Trading is a negative sum game. I did that in my earlier days but its a futile excercise.
 

Tavnaz

Well-Known Member
#28
The highlighted part is only relevant if we consider an autotrading system which identifies trends and takes trades based on that. What you said further is absolutely true, but I struggle in coding that into an auto system. It will be great if I can achieve that, till then it's experimentation with some simpler systems, but such systems give good results in swing and go haywire in intraday. Although if doing manually, I would also tend to do something similar to what you mentioned.
You can always get help with coding,from forums or professional paid help by shedding some cash. if you really believe your idea is really worth it.
I don't see it as difficult the automatic system just has to record the highs and lows as arrays,shift to sell mode when the set of lows formed during move are broken downstairs by current move.never mind you have not elaborated in detail what you are working on.
Nothing is impossible,everything can be achieved.
About the automation you can't just leave thimgs on autopilot,here is always some manual element to even automated systems as well,knowing when to turn on the automated system comes from the experience of trader,gathered about during trading life.
Keep at it eventually you will get it right.
But it is going to need lots of forward testing ,back testing is almost always a joke.

Warm Regards
God bless you;-)
 

vijkris

Learner and Follower
#29
You can always get help with coding,from forums or professional paid help by shedding some cash. if you really believe your idea is really worth it.
I don't see it as difficult the automatic system just has to record the highs and lows as arrays,shift to sell mode when the set of lows formed during move are broken downstairs by current move.never mind you have not elaborated in detail what you are working on.
Nothing is impossible,everything can be achieved.
About the automation you can't just leave thimgs on autopilot,here is always some manual element to even automated systems as well,knowing when to turn on the automated system comes from the experience of trader,gathered about during trading life.
Keep at it eventually you will get it right.
But it is going to need lots of forward testing ,back testing is almost always a joke.

Warm Regards
God bless you;-)
if due to fear we switch off autotrade, then it defeats the purpose.
I suppose we should code in scenarios we would like to avoid. eg. during rbi policy day, we can code like big volatile bars means don trade for 30 min. etc etc.
 

vijkris

Learner and Follower
#30
wat abt vwap and AMA?
Don't have any idea about VWAP and AMA.
Actually I don't use amibroker for intraday but now i need to think about this also planning to do swing in automation then need to learn about this.

Please give some basic idea about VWAP, AMA.....will test these things in weekend.
They will certainly aid in trading decision. There are two things when we use higher TF trend to filter trades in shorter TF :

1) Finding trades in the direction of higher TF trend. Lower TF crossovers or VWAP/AMA combo can do that.

2) Ensuring that we get an early entry in the trade. This makes sure our winners run for longer than losers. Simple crossovers tend to do this. Now, will VWAP/AMA help in this, I am not sure yet.

So, the trade-off is between accuracy and net profit. If you can share VWAP/AMA AFLs, I can try testing them.

PS : Everything written above is in context of algo trading.
Vwap concept needs lot of understanding, so leave it for now. instead u can focus on ama. it is 15tf afl. using param can be changed to 60min tf. for daily use 1440min.
fixed generic AMATF

Code:
datamode = ParamToggle("Data Mode", "No|Yes", 0) ;
showintitle = ParamToggle("Show in Title", "No|Yes", 0) ;
showlabel = ParamToggle("Show Label", "No|Yes", 1) ;

usetf = ParamToggle("Use TF", "No|Yes", 0) ;
tf = Param("TF", 6, 1, 100000, 1) ;
isexpandLast = ParamToggle("Expand Mode", "First|Last", 1) ;
expandmode = IIf(isexpandLast, expandLast, expandFirst) ;

period = Param("Period", 30, 1, 100, 1) ;
noiseperiod = Param("Noise Period", 5, 1, 100, 1) ;
Clr = ParamColor("AMA Color", colorLightOrange) ;
ClrClose = ParamColor("AMA Close Color", colorOrange) ;

MAwidthper = Param("MA Width %", 0.005, 0, 10, 1) ;
MAwidth = SelectedValue(C) * MAwidthper /100 ;
showasband = ParamToggle("Show as band", "No|Yes", 1) ;
Onlyclose = ParamToggle("Show Only Close", "No|Yes", 0) ;
showclosebias = ParamToggle("Show Close Bias", "No|Yes", 0) ;
Closebiasht = Param("Close bias Ht", 4, 0, 100) ;
Clrbiasup = ParamColor("Color Bias Up", colorSkyblue) ;
Clrbiasdn = ParamColor("Color Bias Down", colorRose) ;
Clrbiasnone = ParamColor("Color Bias None", colorLavender) ;

Clrband = ParamColor("Color Band", colorGold) ;
bandlevel = Param("Level Band", -1, -5, 5, 1) ;
tradearr = ParamToggle("Show Trade Arrow", "No|Yes", 0) ;
triggertypepvt = ParamToggle("Trigger Type", "Bar|Pvt", 0) ;
Onbody= ParamToggle("BO style", "H-L|Body", 1) ;

datamodestyle = styleNoRescale ;
if (NOT showintitle)
	datamodestyle |= styleNoTitle ;
if (NOT showlabel)
	datamodestyle |= styleNoLabel ;

if (datamode)
	datamodestyle = styleNoDraw|styleNoTitle|styleNoLabel|styleNoRescale ;

onlyClosestyle = 0 ;
if (Onlyclose)
	OnlyClosestyle = styleNoDraw ;

tfs = tf *in1Minute ;
if (usetf)
	TimeFrameSet(tfs) ;

tfma = int(Interval()/60) ;
if (usetf AND tfs >= Interval())
	tfma = tf ;

strtf = NumToStr(tfma, 8.0)+"min" ;

Refo = ParamField("TF Open", 0) ;
Refh = ParamField("TF High", 1) ;
Refl = ParamField("TF Low", 2) ;
Refc = ParamField("TF Close", 3) ;
//Refbi = ParamField("BI", 4) ;

//Plot(EMA( Close, period ), "", colorRed) ;
fast = 2/(2+1);
slow = 2/(period+1);
dir=abs(Refc -Ref(Refc ,-noiseperiod ));
vol=Sum(abs(Refc -Ref(Refc,-1)),noiseperiod );
//ER=dir/vol;
ER=IIf(vol == 0, Ref(vol, -1), dir/vol);
sc =( ER*(fast-slow)+slow)^2; 
amaplotcx = AMA( Refc, sc ); 

dirh=abs(Refh -Ref(Refh ,-noiseperiod ));
volh=Sum(abs(Refh -Ref(Refh,-1)),noiseperiod );
//ERh=dirh/volh;
ERh=IIf(volh == 0, Ref(volh, -1), dirh/volh);
sch =( ERh*(fast-slow)+slow)^2; 
amaplothx = AMA( Refh, sch ); 

dirl=abs(Refl -Ref(Refl ,-noiseperiod ));
voll=Sum(abs(Refl -Ref(Refl,-1)),noiseperiod );
ERl=IIf(voll == 0, Ref(voll, -1), dirl/voll);
scl =( ERl*(fast-slow)+slow)^2; 
amaplotlx = AMA( Refl, scl ); 

	amaplotc = amaplotcx ;
	amaploth = amaplothx ;
	amaplotl = amaplotlx ;

if (usetf)
{
	amaplotc = TimeFrameExpand(amaplotcx, tfs, expandmode) ;
	amaploth = TimeFrameExpand(amaplothx, tfs, expandmode) ;
	amaplotl = TimeFrameExpand(amaplotlx, tfs, expandmode) ;

	TimeFrameRestore() ;
}

	showoncrb = ParamToggle("Show On CRB", "No|Yes", 0) ;
	Refo = ParamField("CRB Open", 7+0) ;
	Refh = ParamField("CRB High", 7+1) ;
	Refl = ParamField("CRB Low", 7+2) ;
	Refc = ParamField("CRB Close", 7+3) ;
	Refbi = ParamField("CRB BI", 7+4) ;
	Refcrbbars = ParamField("CRB Bars", 7+5) ;
	Refnbars = ParamField("TF Bars", 7+6) ;
	Refdt = ParamField("CRB DT", 7+7) ;


	if (showoncrb)
	{
		diffbars = Refnbars -Refcrbbars -1 ;

		// convert to crb
		Refamaploth = Ref(amaploth, -diffbars) ;
		Refamaplotc = Ref(amaplotc, -diffbars) ;
		Refamaplotl = Ref(amaplotl, -diffbars) ;

//		RefClre = Ref(Clr, -diffbars) ;

		k = 0 ;
		for ( i = Crbst ; i < BarCount ; i++)
		{
			Refbar = Refbi[i];

			Refamaploth[i] = amaploth[Refbar] ;
			Refamaplotc[i] = amaplotc[Refbar] ;
			Refamaplotl[i] = amaplotl[Refbar] ;

//			RefClre[i] = Clr[Refbar];
			k++;
		}
	}
	else
	{
		Refamaploth = amaploth ;
		Refamaplotc = amaplotc ;
		Refamaplotl = amaplotl ;
//		RefClre = Clre ;
	}


Plot(Refamaplotc, strtf+"AMA close"+NumToStr(period, 1.0)+" "+ NumToStr(noiseperiod , 1.0), ClrClose, styleThick|datamodestyle) ;
Plot(Refamaploth, strtf+"AMA high"+NumToStr(period, 1.0)+" "+ NumToStr(noiseperiod , 1.0), Clr, styleThick|datamodestyle|OnlyClosestyle) ;
Plot(Refamaplotl, strtf+"AMA low"+NumToStr(period, 1.0)+" "+ NumToStr(noiseperiod , 1.0), Clr, styleThick|datamodestyle|OnlyClosestyle) ;
if (MAwidth > 0)
	PlotOHLC(Refamaplotc+MAwidth, Refamaplotc+MAwidth, Refamaplotc-MAwidth, Refamaplotc-MAwidth, "", ClrClose , styleCloud|styleNoLabel|datamodestyle) ;
if (showasband)
{
	PlotOHLC(Refamaploth, Refamaploth, Refamaplotl, Refamaplotl, "", Clrband, styleCloud|styleNoLabel|datamodestyle|OnlyClosestyle, 0, 0, 0, bandlevel) ;
}

if (showclosebias)
{
	upside = Refamaploth-(Refamaploth-Refamaplotl)/3 ;
	dnside = Refamaplotl+(Refamaploth-Refamaplotl)/3 ;

	up = Refamaplotc >= upside ;
	dn = Refamaplotc <= dnside ;

	Clr = IIf(up, Clrbiasup, IIf(dn, Clrbiasdn,Clrbiasnone)) ;

	Plot(Closebiasht, "", Clr, styleArea|styleNoLabel|styleOwnScale, 0, 100) ;
}

showparam = ParamToggle("Show Key Param", "No|Yes", 1) ;

if (showparam)
{
	y = (SelectedValue(Refamaploth)+ SelectedValue(Refamaplotl)) /2 ;
	tfsd = tfs ;
	if (tfsd < Interval())
		tfsd = Interval() ;

//	str = "TF="+NumToStr(tfsd/in1Minute, 1.0) + " P=" + NumToStr(period, 1.0)+"-"+ NumToStr(noiseperiod, 1.0);
	str = NumToStr(tfsd/in1Minute, 1.0) + " AMA" ;
	PlotText(str, BarCount+2, y, colorBlack) ;
}

showrib = ParamToggle("Show Ribbon", "No|Yes", 0) ;
barht = Param("Bar Ht", 4, 1, 100) ;

Refo = ParamField("Open", 0) ;
Refh = ParamField("High", 1) ;
Refl = ParamField("Low", 2) ;
Refc = ParamField("Close", 3) ;

if (showrib)
{
	Buy = Refc > Max(Refamaplotc, Refamaploth) ;
	Short = Refc < Min(Refamaplotc, Refamaplotl) ;

	up = Flip(Buy, Short) ;
	dn = Flip(Short, Buy) ;

	Clr = IIf(up, colorBlue, colorRed) ;

	Plot(barht, "", Clr, styleArea|styleNoLabel|styleOwnScale, 0, 100) ;
}

isemapvts = ParamToggle("Pvt Type", "H-L|EMA", 1) ;

if (tradearr)// AND NOT datamode)
{
avgP = (Refh+refl+Refc)/3 ;
p1 = Param("Fast", 1, 1, 100, 1) ;
p2 = Param("Slow", 3, 1, 100, 1) ;

ismph = H-H ;
ismpl = L-L ;
if (isemapvts)
{
EMA1 = EMA(avgP, p1) ;
EMA2 = EMA(avgP, p2) ;

upcross = Cross(EMA1, EMA2) ;
downcross = Cross(EMA2, EMA1) ;

bi = BarIndex() ; 

mphbar = HighestSinceBars(upcross, Refh) ;
mplbar = LowestSinceBars(downcross, Refl) ;

mphbi = ValueWhen(downcross, bi, 0) - ValueWhen(downcross, mphbar, 0) ;
ismph = mphbi == bi ;

mplbi = ValueWhen(upCross, bi, 0) - ValueWhen(upCross, mplbar, 0) ;
ismpl = mplbi == bi ;

ismph = IIf(downCross AND mphbar == 0, True, ismph) ;
ismpl = IIf(upcross AND mplbar == 0, True, ismpl) ;
}
else
{
	ismph = H >= Ref(H, -1) AND H > Ref(H, 1) ;
	ismpl = L <= Ref(L, -1) AND L < Ref(L, 1) ;
/*
	ismph = ExRem(ismph, ismpl) ;
	ismpl = ExRem(ismpl, ismph) ;
	isbmph = ExRem(isbmph, isbmpl) ;
	isbmpl = ExRem(isbmpl, isbmph) ;
*/

}


showminor = ParamToggle("Show Minor Pvts", "No|Yes", 1) ;
showminorlvls = ParamToggle("Show Minor Levels", "No|Yes", 1) ;

issquare = ParamToggle("Pvt style", "Circle|Square", 0) ;
pvtmarker = IIf(issquare, shapeSmallSquare, shapeSmallCircle) ;

if (showminor)
{
	PlotShapes(ismph*pvtmarker , colorRed, 0, Refh, 12) ;
	PlotShapes(ismpl*pvtmarker , colorGreen, 0, Refl, -12) ;
}

mph = ValueWhen(ismph, Refh) ;
mpl = ValueWhen(ismpl, Refl) ;

if (showminorlvls)
{
	x = LineArray(0, SelectedValue(mph), (BarCount-1), SelectedValue(mph));

	Plot(x, "", colorGold, styleDashed);

	x = LineArray(0, SelectedValue(mpl), (BarCount-1), SelectedValue(mpl));

	Plot(x, "", colorGold, styleDashed);
}


	Reflow = Refl ;
	Refhigh = Refh ;
	if (Onbody)
	{
		Reflow = Min(Refo, Refc) ;
		Refhigh = Max(Refo, Refc) ;
	}
	
	if (triggertypepvt)
	{
		Buy = ismph AND Refhigh > AMAploth ;
		Short = ismpl AND Reflow < AMAplotl ;
	}
	else
	{
		Buy = avgP > AMAploth ;
		Short = avgP < AMAplotl ;
	}

	Buy = ExRem(Buy, Short OR Refc < AMAploth ) ;
	Short = ExRem(Short, Buy OR Refc > AMAplotl ) ;

	Sell = (Refc < AMAploth AND NOT Refc  < AMAplotl AND Refl > AMAplotl) ;
	Cover = (Refc  > AMAplotl AND NOT Refc  > AMAploth AND Refh < AMAploth) ;

	Cover = ExRem(Cover, Short OR Buy) ;
	Sell = ExRem(Sell, Short OR Buy) ;

	PlotShapes(Buy*shapeUpTriangle, colorGreen, 0, Refh, 12) ;
	PlotShapes(Short*shapeDownTriangle, colorBrown, 0, Refl, 12) ;

	showsl = ParamToggle("Show SL", "No|Yes", 0) ;
	if (showsl)
	{
		PlotShapes(Cover*shapeSmallUpTriangle, colorBlack, 0, Refh, 12) ;
		PlotShapes(Sell*shapeSmallDownTriangle, colorBlack, 0, Refl, 12) ;
	}

}
 

Similar threads