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

BAR SUPPORT & RESISTANCE DAY TO DAY INCOM for Amibroker (AFL)

Copy & Paste Friendly
_SECTION_BEGIN("DAY TO DAY INCOME");
Datex=DateNum();
timex=TimeNum();
C13=20;
C14=2.1;
C15=12;
Miny = Status("axisminy");
Maxy = Status("axismaxy");
lvb = Status("lastvisiblebar");
fvb = Status("firstvisiblebar");
pxwidth = Status("pxwidth");
pxheight = Status("pxheight");


Plot(C,"Price",IIf(O>C,colorRed,colorGreen),styleBar);
_SECTION_END();

MAPeriod = Param("MA Period", 4, 1, 100);
MAOpen = EMA(Open, MAPeriod);
MAHigh = EMA(High, MAPeriod);
MALow = EMA(Low, MAPeriod);
MAClose = EMA(Close, MAPeriod);
 
HaClose = (MAOpen + MAHigh + MALow + MAClose) / 4;
HaOpen = AMA(Ref(HaClose, -1), 0.5);
 




HaHigh = Max(MAHigh, Max(HaClose, HaOpen)); 
HaLow = Min(MALow, Min(HaClose, HaOpen)); 
 
 
//////////////////////////////////////////////////////////////////////////
 
PK = HaHigh > Ref(HaHigh,-1) AND Ref(HaHigh,1) < HaHigh;//Peak
PKV0 = ValueWhen(PK,HaHigh,0);
PKV1 = ValueWhen(PK,HaHigh,1);
PKV2 = ValueWhen(PK,HaHigh,2);
MPK = PKV2 < PKV1 AND PKV1 > PKV0 ;
MPKV = ValueWhen(Ref(MPK,-1) == 0 AND MPK == 1, PKV1,1); 
MPKD = ValueWhen(Ref(MPK,-1) == 0 AND MPK == 1, DateNum(),1); 
SD = IIf(DateNum() < LastValue(MPKD,lastmode = True ), Null, LastValue(MPKV,Lastmode = True));//SelectedDate
Plot(SD, "Resistance",colorRed,styleLine,styleThick);
 
MPKV2 = ValueWhen(Ref(MPK,-1) == 0 AND MPK == 1, PKV1,2); 
MPKD2 = ValueWhen(Ref(MPK,-1) == 0 AND MPK == 1, DateNum(),2); 
SD2 = IIf(DateNum() < LastValue(MPKD2,lastmode = True ), Null, LastValue(MPKV2,Lastmode = True));//SelectedDate
Plot(SD2, "MajorResistance",colorRed,styleLine);
_SECTION_END();
 
SP = Ref(HaLow,1) > HaLow AND HaLow < Ref(HaLow,-1);//Peak
SPV0 = ValueWhen(SP,HaLow,0);
SPV1 = ValueWhen(SP,HaLow,1);
SPV2 = ValueWhen(SP,HaLow,2);
MSP = SPV2 > SPV1 AND SPV1 < SPV0 ;
MSPV = ValueWhen(Ref(MSP,-1) == 0 AND MSP == 1, SPV1,1); 
MSPD = ValueWhen(Ref(MSP,-1) == 0 AND MSP == 1, DateNum(),1); 
SD = IIf(DateNum() < LastValue(MSPD,lastmode = True ), Null, LastValue(MSPV,Lastmode = True));
Plot(SD,"MinorSupport",colorGreen,styleLine,styleThick);
 
 
MSPV2 = ValueWhen(Ref(MSP,-1) == 0 AND MSP == 1, SPV1,2); 
MSPD2 = ValueWhen(Ref(MSP,-1) == 0 AND MSP == 1, DateNum(),2); 
SD2 = IIf(DateNum() < LastValue(MSPD2,lastmode = True ), Null, LastValue(MSPV2,Lastmode = True));
Plot(SD2,"Support",colorGreen,styleLine);
 GfxTextOut( "DAY TO DAY INCOME", Status("pxwidth")/C14, Status("pxheight")/C15 );
GfxSelectFont("Tahoma", Status("pxheight")/C13*0.5 );
GfxSetTextColor( ColorRGB (103,103,103));
GfxTextOut( "By", Status("pxwidth")/C14, Status("pxheight")/C15*2.5 );
GfxSelectFont("Tahoma", Status("pxheight")/C13*0.5 );
GfxSetTextColor( ColorRGB (103,103,103));
GfxTextOut( "NIFTYASSAM.BLOGSPOT.IN", Status("pxwidth")/C14, Status("pxheight")/C15*4 );

_SECTION_END();
 
 
Back