Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Indicator supply and demand for Amibroker (AFL)

Rating:
4 / 5 (Votes 2)
Tags:
oscillator, amibroker

Indicator supply and demand

Similar Indicators / Formulas

Febo RSI ..real indicator
Submitted by abhinavsingh over 12 years ago
Trading Volume Statistic
Submitted by tuanstock1 over 9 years ago
Ergodic Oscillator
Submitted by dljtrader over 13 years ago
3 Days Track
Submitted by janet0211 almost 14 years ago
Chande Momentum Oscillator
Submitted by klimpek over 13 years ago
BoH Risk Aversion Indicator
Submitted by genkumag over 12 years ago

Indicator / Formula

Copy & Paste Friendly
//Set Variables
barvisible = Status("barvisible");
Leftbar=ValueWhen(Ref(barvisible,-1)==0 AND barvisible,DateTime() );
Rightbar=LastValue(DateTime() );
DateSpan = EndValue(BarIndex()) - BeginValue(BarIndex());
Range = DateSpan ;
StartDate = BeginValue(BarIndex());
EndDate = EndValue(BarIndex());

CC = "CC_" + Name();

KLMua = Prec(Foreign(CC,"V",0),0);
KLBan = Prec(Foreign(CC,"interest",0),0);

//KLMua = OpenInt;
_SECTION_BEGIN("KLMua");
Plot(KLMua,"Khoi luong mua",colorBlue,styleThick);
_SECTION_END() ;

_SECTION_BEGIN("KLBan");
Plot(KLBan,"Khoi luong ban",colorRed,styleThick);
_SECTION_END() ;
//Set Variables
barvisible = Status("barvisible");
FVB = barvisible AND NOT Ref( barvisible, -1 );
CVB = ValueWhen( FVB,C) ;
Leftbar=ValueWhen(Ref(barvisible,-1)==0 AND barvisible,DateTime() );
Rightbar=LastValue(DateTime() );
DateSpan = EndValue(BarIndex()) - BeginValue(BarIndex());
Range = DateSpan ;
StartDate = BeginValue(BarIndex());
EndDate = EndValue(BarIndex());

CC = "CC_" + Name();

SLBan = Foreign(CC,"C",0);
SLMua = Foreign(CC,"O",0);

_SECTION_BEGIN("SLMua");
Plot(SLMua,"So lenh mua", colorBlue,ParamStyle("Style",styleThick));
_SECTION_END();

_SECTION_BEGIN("SLBan");
Plot(SLBan,"So lenh ban", colorRed,ParamStyle("Style", styleThick));
_SECTION_END();
//Set Variables
barvisible = Status("barvisible");
FVB = barvisible AND NOT Ref( barvisible, -1 );
CVB = ValueWhen( FVB,C) ;
Leftbar=ValueWhen(Ref(barvisible,-1)==0 AND barvisible,DateTime() );
Rightbar=LastValue(DateTime() );
DateSpan = EndValue(BarIndex()) - BeginValue(BarIndex());
Range = DateSpan ;
StartDate = BeginValue(BarIndex());
EndDate = EndValue(BarIndex());

CC = "CC_" + Name();

SLBan = Foreign(CC,"C",0);
SLMua = Foreign(CC,"O",0);

KLMua = Prec(Foreign(CC,"V",0),0);
KLBan = Prec(Foreign(CC,"interest",0),0);

TBLenhmua = IIf(SLMua != 0,KLMua/SLMua,0);
TBLenhBan = IIf(SLBan != 0,KLBan/SLBan,0);
TBMuachiaTBBan = IIf(TBLenhBan !=0 , TBLenhmua /TBLenhBan *100,0);

_SECTION_BEGIN("TBLenhmua ");
Plot(TBLenhmua ,"TB lenh mua", colorBlue,ParamStyle("Style",styleThick));
_SECTION_END();

_SECTION_BEGIN("TBLenhban");
Plot(TBLenhban,"TB lenh ban", colorRed,ParamStyle("Style", styleThick));
_SECTION_END();

_SECTION_BEGIN("TBMuachiaTBBan ");
Plot(TBMuachiaTBBan ,"Ti le Mua/Ban (%)", colorGreen,ParamStyle("Style", styleHistogram));
_SECTION_END();
//Set Variables
barvisible = Status("barvisible");
FVB = barvisible AND NOT Ref( barvisible, -1 );
CVB = ValueWhen( FVB,C) ;
Leftbar=ValueWhen(Ref(barvisible,-1)==0 AND barvisible,DateTime() );
Rightbar=LastValue(DateTime() );
DateSpan = EndValue(BarIndex()) - BeginValue(BarIndex());
Range = DateSpan ;
StartDate = BeginValue(BarIndex());
EndDate = EndValue(BarIndex());

NN = "NN_" + Name();

KLBan = Foreign(NN,"C",0);
KLMua = Foreign(NN,"O",0);

_SECTION_BEGIN("KLMua");
Plot(KLMua,"NN mua(KL)", colorBlue,ParamStyle("Style",styleThick));
_SECTION_END();

_SECTION_BEGIN("KLBan");
Plot(KLBan,"NN ban(KL)", colorRed,ParamStyle("Style", styleThick));
_SECTION_END();

_SECTION_BEGIN("FOREIGN TRADING");
Plot( OI, _DEFAULT_NAME(), ParamColor("Color", colorBlueGrey ), ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick, maskHistogram ), 2 );
_SECTION_END();

//Set Variables
barvisible = Status("barvisible");
Leftbar=ValueWhen(Ref(barvisible,-1)==0 AND barvisible,DateTime() );
Rightbar=LastValue(DateTime() );
DateSpan = EndValue(BarIndex()) - BeginValue(BarIndex());
Range = DateSpan ;
StartDate = BeginValue(BarIndex());
EndDate = EndValue(BarIndex());

NN = "NN_" + Name();

GTMua = Prec(Foreign(NN,"V",0),0);
GTBan = Prec(Foreign(NN,"interest",0),0);

//GTMua = OpenInt;
_SECTION_BEGIN("GTMua");
Plot(GTMua,"NN mua (GT)",colorBlue,styleThick);
_SECTION_END() ;

_SECTION_BEGIN("GTBan");
Plot(GTBan,"NN ban (GT)",colorRed,styleThick);
_SECTION_END() ;


//Set Variables
barvisible = Status("barvisible");
FVB = barvisible AND NOT Ref( barvisible, -1 );
CVB = ValueWhen( FVB,C) ;
Leftbar=ValueWhen(Ref(barvisible,-1)==0 AND barvisible,DateTime() );
Rightbar=LastValue(DateTime() );
DateSpan = EndValue(BarIndex()) - BeginValue(BarIndex());
Range = DateSpan ;
StartDate = BeginValue(BarIndex());
EndDate = EndValue(BarIndex());

NN = "NN_" + Name();

KLBan = Foreign(NN,"C",0);
KLMua = Foreign(NN,"O",0);

GTMua = Prec(Foreign(NN,"V",0),0);
GTBan = Prec(Foreign(NN,"interest",0),0);

TBGiaMua = IIf(KLMua != 0,GTMua/KLMua,0);
TBGiaBan = IIf(KLBan != 0,GTBan/KLBan,0);
TBGiaMuaBan = IIf(TBGiaBan !=0 , TBGiaMua /TBGiaBan *100,0);

_SECTION_BEGIN("TBGiaMua ");
Plot(TBGiaMua ,"NN(TBgiamua)", colorBlue,ParamStyle("Style",styleThick));
_SECTION_END();

_SECTION_BEGIN("TBGiaBan");
Plot(TBGiaBan,"NN(TBgiaban", colorRed,ParamStyle("Style", styleThick));
_SECTION_END();

_SECTION_BEGIN("TBGiaMuaBan");
Plot(TBGiaMuaBan,"TileGiaMua/Ban (%)", colorGreen,ParamStyle("Style", styleHistogram));
_SECTION_END();

2 comments

1. ford7k

hi
The real supply demand code is currently available only in mt4
its name is
II_SupDemandv2
in fact 3 different versions are available.
hope some expert will bring it to amibroker

ultimaforex and insanity made two codes
regards
ford

2. haki

Any one can translate this language?

Leave Comment

Please login here to leave a comment.

Back