Volume Profile and Market Profile a new wave of market picture

Status
Not open for further replies.

XRAY27

Well-Known Member
Kindly paste code again, the last part has been truncated in AFL.
some lines are missing at the end :D
It well work even with last "TITLE LINE" :D anyways added..


_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",colorTurquoise), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

_SECTION_BEGIN("Volume Profile");
//VP
GraphXSpace = 5;
SetChartOptions(0, chartShowDates);

//===========================

Den = Param("Density", 200, 10, 300, 10);

ShowVP = ParamToggle("Show VP", "No|Yes");

StyleVP = ParamStyle("style VP", styleLine|styleDots, maskAll);

//===========================
BarsInDay = BarsSince(Day() != Ref(Day(), -1)) + 1;

//===========================
NewDay = Day() != Ref(Day(), 1) OR Cum(1) == BarCount;

//===========================
Bot = TimeFrameGetPrice("L", inDaily, 0);
Top = TimeFrameGetPrice("H", inDaily, 0);
Vol = TimeFrameGetPrice("V", inDaily, 0);

//===========================

Range = Highest(Top-Bot);
Box = Range/Den;
VolumeUnit = Vol/BarsInDay;

for (k = 0; k < Den; k++) // loop through each line (price) starting at the Lowest price
{
Line = Bot + k*Box;
detect = Line >= L & Line <= H;



if(ShowVP == True)
{
CountVPString = IIf(NewDay, Sum(detect*V, BarsInDay)/VolumeUnit, 0);
CountVPString = Ref(ValueWhen(NewDay, CountVPString, 0), -1);
VpLine = IIf(CountVPString >= BarsInDay, Line + Box/4, Null);
// Plot()
Plot(VPLine, "", colorBlue, styleVP);
}
}


Title = "{{NAME}} - {{INTERVAL}} {{DATE}} {{VALUES}} - \\c06 Volume Profile";
_SECTION_END();
 

XRAY27

Well-Known Member
Todays DP's

NF:8778/8754/8730--VAH/POC/VAL

BNF:20283/20190/20154-VAH/POC/VAL

VPOC (3 MIN TF)

BNF: 20343/20335

NF:8801
 
Last edited:

XRAY27

Well-Known Member
Status
Not open for further replies.

Similar threads