Created
June 9, 2019 03:14
-
-
Save marketcalls/b8961d60684a73e95d31c4a1788788cd to your computer and use it in GitHub Desktop.
How to Estimate the VWAP Settlement Close
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Coded by Rajandran R | |
//Founder of Marketcalls and Co-Founder of Traderscafe | |
//Website : www.marketcalls.in | |
//Note : Code works only in 1min, 2min, 5min timeframe | |
//Amibroker Preferences -> Tools -> Intraday -> Select Start time of the Interval | |
_SECTION_BEGIN("How to Estimate the VWAP Settlement Close"); | |
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", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); | |
Bars_so_far_today = 1 + BarsSince( TimeNum() == 150000); | |
StartBar = ValueWhen(TimeNum() == 150000, BarIndex()); | |
TodayVolume = Sum(V,Bars_so_far_today); | |
average = (H+L+C+C)/4; | |
IIf (BarIndex() >= StartBar, VWAP = Sum (average * V, Bars_so_far_today ) / TodayVolume,0); | |
Plot(IIf(TimeNum() < 150000,null,VWAP),"VWAP",colorYellow,styleLine | styleThick); | |
_SECTION_END(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment