Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Code is attached. Will monitor for a few days to ensure is working properly but pretty sure it is. The only change was the start-end time call for the hvwap.
How the indy works:
There are two aspects.
The first is just plotting the skew, which is the difference between the vwap and the PVP. The vwap is on the chart as the middle line. The PVP is the white hash representing the price (roughly) at which the most volume has traded during the session as defined by the start time.
The second are band lines I added in based on the ATR. I believe the inner bands represent 2* the ATR above/below the current PVP, and the outer lines represent 9*. These might be changed to use Mike's Daily ATR feature. The idea behind the bands was this: often around the PVP there is a lot of backing and filling (which is why that price level becomes the one with the most volume), so this can often be a zone where there is consolidation/stasis. So the bands above/below the PVP are a simplistic attempt to identify graphically when price might be beginning to take off (up or down). The backcolor feature in the indy attempts to highlight when the price is stuck within the inner bands near the PVP showing a potential chop/trading range type situation; but also this can indicate a potential end or change of move after a good swing.
The green line is the difference between the close and the PVP which can be chosen via the first user input.
The PVP 'flips', when the skew changes from positive to negative (gold to cyan in my color scheme) are often very accurate and timely indications of the end of a move and the possible beginning of a change in direction.
This vwap-PVP does not really work as a stand-alone trend determinant. I think the Collective MA is probably better. But they do reveal information that simple MA-type lines, no matter how smartly configured as with the Collective, do not, simply because they are based mainly on volume-at-price versus any relationship between Price [0] and Price[1] in terms of directional bias.
Any ideas for improving this initial Skew Indicator attempt warmly invited. I suspect that it might be helpful for strategy conditions as well as a trading indy. I won't be surprised to learn that somebody else is selling this somewhere, but personally I have never seen it, and I like coming up with new twists on current concepts.
Edit: have added DValueSkew0210c which now has the DailyATR(7) as the Outer Band determinant for the indy, with 2* ATR(37) as the inner bands still. Again, thanks to BM for the coding on the Daily ATR. Also fixed an error in the EndTime which I thought had changed properly but had not. Sorry for any confusion. Have removed the first one.
Of old the skilled first made themselves invincible to await the enemy's vincibility.
Invincibility lies in oneself. Vincibility lies in the enemy.
Thus the skilled can make themselves invincible.
They cannot cause the enemy's vincibility.
Thus it is said: 'Victory can be known; it cannot be made.'
Noticed that the inner bands don't work with longer-term charts so changed the code to be a multiple of the outer bands which are based on 7-day daily atr.
That should be it.
Default start time is 8.20 because I follow gold.
Default session-length is 23.9 hours (24 doesn't work for some reason).
The default is to exclude weekend sessions but that is perhaps a mistake to leave it like that. Easy to change in the input.
Of old the skilled first made themselves invincible to await the enemy's vincibility.
Invincibility lies in oneself. Vincibility lies in the enemy.
Thus the skilled can make themselves invincible.
They cannot cause the enemy's vincibility.
Thus it is said: 'Victory can be known; it cannot be made.'
The skew indicator is generating a runtime error in NT7, on tick interval charts.
On a 1,000 tick chart of ES, the OnBarUpdate() method has an unhandled error: on bar 256 barsAgo was 256 but needs to be between 0 and 255. I'll have a look and try to fix it. Most likely a minor problem.
An example of a negative skew flip combined with TOD (time of day) in indexes. Now I entered earlier than 3.30 EST just for fun, as soon as flip happened because it happened as soon as I loaded the TF chart.
But it worked nicely although if had waited until Retest-Fail on the 3.30 bar (the ideal setup for this TOD trade marked with orange line and vertical gray line on the 3.30 bar), would have entered higher and not had to wait. The 'floor' often makes a sharp move in price around 3.30 to unwind day-trader positions (those that take positions only for the day and usually exit at the close). So if the market has been up, often they will pull it back down to catch their trailing stops.
Of old the skilled first made themselves invincible to await the enemy's vincibility.
Invincibility lies in oneself. Vincibility lies in the enemy.
Thus the skilled can make themselves invincible.
They cannot cause the enemy's vincibility.
Thus it is said: 'Victory can be known; it cannot be made.'
I am getting log errors on hvwap now although everything seems to be running fine notwithstanding.
" Failed to restore indicator 'NinjaTrader.Indicator.hVWAP'. Most likely (a) the implementation changed or (b) one or more properties have been renamed or removed or (c) the custom assembly which implements this indicator no longer is there.
hvwap compiles and runs fine.
Of old the skilled first made themselves invincible to await the enemy's vincibility.
Invincibility lies in oneself. Vincibility lies in the enemy.
Thus the skilled can make themselves invincible.
They cannot cause the enemy's vincibility.
Thus it is said: 'Victory can be known; it cannot be made.'
There is another error msg with hvwap now: the pop-up windows window saying there is a problem with serializing.
The only change I made to original code was to change from "Settings" to "Parameters" as per Mike's guidelines above the start and end time strings.
I have tried to serialize lifting serialization code from Colors but don't know the right lingo (or if it is even possible to serialize strings).
Any suggestions from anyone as to how to fix this?
Am attaching hwvapAsh2 as something that can be played with without messing up original indy.
Of old the skilled first made themselves invincible to await the enemy's vincibility.
Invincibility lies in oneself. Vincibility lies in the enemy.
Thus the skilled can make themselves invincible.
They cannot cause the enemy's vincibility.
Thus it is said: 'Victory can be known; it cannot be made.'
I am not 100% sure about this but I think the problem is that some of my templates which load in a workspace include hvwap and by changing from Settings to Properties I screwed them up. Because you are right: no error with Skew indy which is referencing a version of hvwap I made (and which has the exact same code as hvwap after my alterations).
Later: no, that's not it. Weird. I actually erased hvwap from my indicators directory (saved elsewhere). None of my current indies reference hvwap (or nothing would compile). And yet the error msg remains. Maybe after rebooting things will be better but for now it's just another one of those endless Ninja mysteries.
Thanks for code tip. Will go and change it now!
Of old the skilled first made themselves invincible to await the enemy's vincibility.
Invincibility lies in oneself. Vincibility lies in the enemy.
Thus the skilled can make themselves invincible.
They cannot cause the enemy's vincibility.
Thus it is said: 'Victory can be known; it cannot be made.'