Need help to code a strategy .

guptak03

Well-Known Member
#1
Hello fnds ,

As we know trend is our friend and price is the best friend..And there are lots of indicator which only trade on price movements and which will be followed by many crowd.
Herei am planning to use volume and price combination which may give us good and stable results on trades..
so i request my Amibroker afl expert fnds to please plot this rules into afl ..
AND
any comment is highly accepted as suggestion's:thumb:

The rules are as fallows..

1: If [volume is low] and [price is low] then Buy....
2: If [volume is medium] and [price is medium] then Hold...
3: If [volume is high] and [price is high] then Sell...
4: If [volume is low] and [price is medium] then Buy..
5: If [volume is low] and [price is high] then Sell.....
6: If [volume is medium] and [price is low] then Hold....
7: If [volume is medium] and [price is high] then Sell....
8: If [volume is high] and [price is low] then Buy...
9: If [volume is high] and [price is medium] then Hold....

Lets Rock the market..
 

jahan

Well-Known Member
#5
Hello fnds ,

As we know trend is our friend and price is the best friend..And there are lots of indicator which only trade on price movements and which will be followed by many crowd.
Herei am planning to use volume and price combination which may give us good and stable results on trades..
so i request my Amibroker afl expert fnds to please plot this rules into afl ..
AND
any comment is highly accepted as suggestion's:thumb:

The rules are as fallows..

1: If [volume is low] and [price is low] then Buy....
2: If [volume is medium] and [price is medium] then Hold...
3: If [volume is high] and [price is high] then Sell...
4: If [volume is low] and [price is medium] then Buy..
5: If [volume is low] and [price is high] then Sell.....
6: If [volume is medium] and [price is low] then Hold....
7: If [volume is medium] and [price is high] then Sell....
8: If [volume is high] and [price is low] then Buy...
9: If [volume is high] and [price is medium] then Hold....

Lets Rock the market..

Hello,

By just giving ur idea is not enough,...u need to give logic also ur just saying volume is high or low or medium is not enough...about how much high or low(how ur deciding volume high,low and medium)...see u need to specify some variable for that also...got my point.u need to elaborate how ur saying that price is high or low or medium so that one can code ur idea...until then it is not possible to code.

Regards,
 

guptak03

Well-Known Member
#7
Hello,

By just giving ur idea is not enough,...u need to give logic also ur just saying volume is high or low or medium is not enough...about how much high or low(how ur deciding volume high,low and medium)...see u need to specify some variable for that also...got my point.u need to elaborate how ur saying that price is high or low or medium so that one can code ur idea...until then it is not possible to code.

Regards,
ok my fnd's are taking interests so there is nothing to hide now its on ( Fuzzy Rule Based Technical Indicator )
http://www.scialert.net/fulltext/?doi=ijaef.2012.53.63&org=11

the link is given above please do share the afl if you can create (its for all afl experts please share)..
 

jahan

Well-Known Member
#8
ok my fnd's are taking interests so there is nothing to hide now its on ( Fuzzy Rule Based Technical Indicator )
http://www.scialert.net/fulltext/?doi=ijaef.2012.53.63&org=11

the link is given above please do share the afl if you can create (its for all afl experts please share)..
Hello,

Nothing new......it is useful only when the input volume is Not tick volume....and u know that we all receive tick volume ....the fuzzy logic only works better when u know actual volume.In the document u provided has clearly stating that only useful/better work for long term...so no use for short term and intra players..... and u know present situation of market .....the days of buy and hold approach are gone.

and by the way the fuzzy logic also uses same inputs as other indicator's uses...in my opinion there is little or no help for Trader.



if u really want to be Volume analyst or Trader or investor ....then u must read Bill william's books and study his indicators on volume.
 
#9
The rules are as fallows..

1: If [volume is low] and [price is low] then Buy....
2: If [volume is medium] and [price is medium] then Hold...
3: If [volume is high] and [price is high] then Sell...
4: If [volume is low] and [price is medium] then Buy..
5: If [volume is low] and [price is high] then Sell.....
6: If [volume is medium] and [price is low] then Hold....
7: If [volume is medium] and [price is high] then Sell....
8: If [volume is high] and [price is low] then Buy...
9: If [volume is high] and [price is medium] then Hold....

Lets Rock the market..
Don't think there is any merit in this logic (above 9 rules as not read the link).
Interested in using volume can also try VSA, or Market Profile

BTW, the AFL for the above 9 rules is v easy to code

Here goes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Code:
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_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() ); 
_SECTION_END();

_SECTION_BEGIN("GUPTAJI KA SYSTEM");
STD_Vol = MA(V,240); //Aprox 1 year average on daily chart
STD_Prc = MA(C,240); //Can change the num 240 as required
Hi_Vol = V >= STD_Vol * 3; // V 3 times normal
Lo_Vol = V <= STD_Vol / 2; // V 1/2 normal
Hi_Prc = C >= STD_Prc * 1.20; // 20% more
Lo_Prc = C <= STD_Prc * 0.85; // 15% less
Md_Vol = V > STD_Vol*0.95 AND V <  STD_Vol*1.05; // 5% band for medium values
Md_Prc = C > STD_Prc*0.95 AND C <  STD_Prc*1.05;
//1: If [volume is low] and [price is low] then Buy....
//4: If [volume is low] and [price is medium] then Buy..
//8: If [volume is high] and [price is low] then Buy...
Buy  = (Lo_Vol AND Lo_Prc) OR (Lo_Vol AND  Md_Prc) OR (Hi_Vol AND Lo_Prc); 
Sell = (Hi_Vol AND Hi_Prc) OR (Lo_Vol AND  Hi_Prc) OR (Md_Vol AND Hi_Prc);
//3: if [Volume is High] AND [price is High] then Sell...
//5: if [Volume is Low] AND [price is High] then Sell.....
//7: if [Volume is medium] AND [price is High] then Sell....
Hold_It = "Don't do no nothing ;)";
//2: if [Volume is medium] AND [price is medium] then Hold...
//6: if [Volume is medium] AND [price is Low] then Hold....
//9: if [Volume is High] AND [price is medium] then Hold....
Buy  = ExRem(Buy,Sell);    Sell = ExRem(Sell,Buy); 
PlotShapes(Buy+Sell*2,colorRed,0,IIf(Buy,L,H));
Plot(STD_Prc,"STD_Prc",colorBlueGrey);
Plot(STD_Vol,"STD_Vol",colorLightGrey, styleThick | styleOwnScale,0,HighestVisibleValue(V)*2);
Plot(IIf(V>0,V,Null), "Volume", IIf(Hi_Vol, colorRed, IIf(Lo_Vol, colorBlue, colorLightGrey)), styleThick | styleHistogram | styleOwnScale,0,HighestVisibleValue(V)*2);
_SECTION_END();
 
Last edited:
#10
hi HAPPY SINGH

Volume based STRATEGIES ARE HARD TO IMPLEMENT.
VSA NEEDS OVER 450 RULES TO KNOW BYHEART REMEmBER MASTER.

MARKET PROFILE HAS ITS OWN DIFFICULTIES & NOT SUITABLE FOR ORDINARY TRADERS.
STAY AWAY FROM THESE STRATEGIES.
Trading should be based on simple concepts.

Want example?
try trading ma5 and ma20 crossovers and buy or sell only ma20 has 30 degrees slope to horizontal either upwards or downwards.
point is do you have that edge which puts odds in your favour or not.

ford
 

Similar threads

Trade in Rs 20, No more % brokerage

Name:Phone:
Email:City:
State:
Are you a day trader?