Hope you guys dont mind me posting here... Segul..you were saying something about MP.. I will love to know more.
For those who use Amibroker, I have written this AFL.. which shows the MarketProfile levels where there is more congestion...(Its not MP AFL)...You can use this to identify major support/resistance level.
warning : Use this just as a reference... nothing can replace the visual pivot and congestion zone identification
I call this AFL MudPuddle
========================================================
_SECTION_BEGIN("MudPuddle");
SetBarsRequired(1000,1000);
////////////////////////////////////////////////////////////////////////////////
// Global Variables
weekly = ParamToggle("Weekly","off|On");
zoneCol = ParamColor("Congestion Zone", colorGrey50);
Days = Param("Days",2,1,300,1);
style = ParamStyle("Style");
NewDay =Day()!= Ref(Day(), 1);
if ( weekly )
{
NewDay =DayOfWeek() > Ref(DayOfWeek(), 1);
Days = 1;
if ( LastValue(DayOfWeek()) < 3 )
{
Days = 7;
}
}
DH =LastValue(HighestSince(NewDay, H, Days));
DL =LastValue(LowestSince(NewDay, L, Days));
Range = DH - DL;
start = LastValue(ValueWhen(NewDay, Cum(1), Days));
end = LastValue(Cum(1)) -1;
/////////////////////////////////////////////////////////////////////////////////
// Congestion Zone Calculation and Drawing
profile = C - C;
procedure caclulateCongestionZone()
{
for ( pos = 0; pos < Range; pos ++ )
{
profile[pos] = 0;
Location = DH - pos;
bars = 0;
for ( i = start; i <= end; i ++ )
{
if(H >= Location AND L <= Location)
{
bars ++;
}
}
profile[pos] = bars;
}
}
procedure drawCongestionZone()
{
caclulateCongestionZone();
// main array with the profile
top = LastValue(Highest(profile))/Param("Sensitivity",1.2,1,100,0.05);
for ( pos = 0 ; pos < Range; pos++)
{
if ( profile[pos] >= top)
{
Plot(DH - pos,"",zoneCol,styleNoLabel|style,0,0,3);
}
}
}
///////////////////////////////////////////////////////////////////////////////
// Main program
drawCongestionZone();
_SECTION_END();
==========================================================
Settings (right click and parameters)
Days : default is 2 ... You can increase the number of days but it will Hog the CPU
Sensitivity : it shows the higest congestion zones... default is 1.2 .. increase to get less levels .. decrease to get more levels
Weekly : Instead of using days .. can use weekly ..if its monday or twesday then it will use friday,etc .. in calculation
If it gives error.. reduce number of days...(if in weekly, come back to daily and reduce days)
Enjoy,