Simple Coding Help - No Promise.

doss186

Well-Known Member
Dear Romeo
There is is a phenomenon called VSA (volume spread analysis) which was originally used by Richard Wyckoff and developed into a strategy by Tom Williams. Later it was also used by Nigel Hawk, they are available as add on indicators for ninjatrader which is not affordable for average Indian daytrater. Can we port such things in amibroker.
 

Romeo1998

Well-Known Member
Dear friend CloudTrader,
thank u for ur kind words :happy:
i have never used ninjatrader software :pompus: n i am not the original creator of this afl :D
i have just modified it little bit to make it work ( as earlier it was giving errors ) :pompus:
when it looked fine on my chart in all timeframes, i posted it here :D
after reading ur post, i used this code with bar replay, it uses the current price too bcoz a new renko brick is created only when it crosses the high or low of the current brick ( but still i m not very sure abt it as i m not the original creator of this afl :D )
 
Last edited:
Today's EOD volume is 10 times greater than previous day's EOD volume

Today's closing price is greater than previous day's closing price

is it possible to create a scanner for this concept in AMIBROKER ?
 

Romeo1998

Well-Known Member
Dear friend vsreeram77,
use this code :happy:
Code:
// Buy on 3rd day with given condition :)
Buy = C> Ref(C,-1) AND Ref(C,-1) > Ref(C,-2) ;

// Sell on open of 4th day :)
Sell =  ValueWhen(Ref(Buy,1),O);

Buy = ExRem (Buy,Sell);
Sell = ExRem (Sell,Buy);

Filter = Buy OR Sell;
AddColumn(IIf(Buy,C,Null),"Buy",1.2);
AddColumn(IIf(Sell,O,Null),"Sell",1.2);
:happy:
 
Last edited:

Romeo1998

Well-Known Member
Dear friend vsreeram77,
use this code :happy:
Note -- Symbol must have volume data or else nothing will be shown in exploration :happy:
Code:
// Volume is 10 times more than yesterday's volume
// and current price is higher than yesterday's close
Cond = V>Ref(V,-1)*10 AND C> Ref(C,-1);

Filter = Cond;
AddColumn(IIf(cond,1,Null),"Condition",1,colorBlack,IIf(cond,colorLightBlue,Null));
:happy:
 
Last edited:

trash

Well-Known Member
Dear friend vsreeram77,
use this code :happy:
Code:
// Buy on 3rd day with given condition :)
Buy = C> Ref(C,-1) AND Ref(C,-1) > Ref(C,-2) ;

// Sell on open of 4th day :)
Sell =  ValueWhen(Ref(Buy,1),O);

Buy = ExRem (Buy,Sell);
Sell = ExRem (Sell,Buy);

Filter = Buy OR Sell;
AddColumn(IIf(Buy,C,Null),"Buy",1.2);
AddColumn(IIf(Sell,O,Null),"Sell",1.2);
:happy:
That code is nonsense (especially see Sell variable). I mean if you don't know what you are doing then stop spreading around codes that make no sense and leading to more junk (people will copy&paste junk code and spread around junk even further).
 

Similar threads