I'll wait for your PVP; I'm sure it will be great if you decide to make it.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
All GomRecorder Indicators
Collapse
X
-
So far so good! I'll test it longer tomorrow. Thanks a lot again.
I'll wait for your PVP; I'm sure it will be great if you decide to make it.
-
Hi Gomi, I think I can say that GomVolumeProfile works now.
Thanks again and I'll be waiting for your PVP.
Comment
-
Well guess Ninja's own VolumeProfile indicator is flawed then because I had only rewrapped some GomRecorder stuff around it.
Comment
-
NT 7 and loss of 1st tick of a new bar.
When using GomDeltaVolume indicator I noticed that the delta of the bars usually differed slightly from what I saw in investor RT's VB indicator (live data). Both are using IQFeed data. I tracked the issue down to the 1st tick of the new bars GomOnMarketData being called before GomOnBarUpdate. I worked around it by storing the last delta and volume in GomOnMarketUpdate and reinitializing totalvolume and deltavolume to those values when a new bar forms.
I just started using NT and only use NT7, so I assume isn't desired behavior for NT6.5. I've attached the modified indicator below. If this isn't right for NT6.5 I'm sure an #if could be used to make it compatible.
Now to figure out why the values of the indicators change when I reload the chart and it reads back from the file!Attached Files
Comment
-
-
No thank you!
No problem. I really appreciate what you've created and shared here, without you NT wouldn't be suitable for my use!
I'm interested in getting longer term volume profiles based on minute data due the difficulty of obtaining long term tick data and the space it requires.
I'm planning to look into expanding your suite of indicators to accept minute data and break it down into "ticks" with the volume in the minute bar spread equally over range of the bar. You lose delta capabilities, but the VP would still be accurate. Maybe there is something that already does what I want, so I'll do some investigating before I really go to town. Or just handle that breakdown in "preproduction" by creating gom file with the minutes split into fake ticks.
Anyway, thanks again!
Comment
-
Originally posted by danjurgens View Post
Now to figure out why the values of the indicators change when I reload the chart and it reads back from the file!
gomi: There is a big thread on BigMike's about this change in NT7 where OnMarketData() triggers prior to OnBarUpdate(); I actually like that if you are primarily work on tick based data. Also FirstTickOfBar is tied to OnBarUpdate() only and its value should not be relied on in the OnMarketData() call.
Comment
-
Thanks for the info. Quite likely the 1 second "fuzz" is causing a bit of volume rearranging. That explains why the per bar values disagree with other sources but the cumulative delta seems to match.
Comment
-
Originally posted by danjurgens View PostNo problem. I really appreciate what you've created and shared here, without you NT wouldn't be suitable for my use!
I'm interested in getting longer term volume profiles based on minute data due the difficulty of obtaining long term tick data and the space it requires.
I'm planning to look into expanding your suite of indicators to accept minute data and break it down into "ticks" with the volume in the minute bar spread equally over range of the bar. You lose delta capabilities, but the VP would still be accurate. Maybe there is something that already does what I want, so I'll do some investigating before I really go to town. Or just handle that breakdown in "preproduction" by creating gom file with the minutes split into fake ticks.
Anyway, thanks again!
Comment
-
Originally posted by aviat72 View PostWhen you reload all the volume for that second goes to the first bar and the other bars get nothing.
Originally posted by aviat72 View Postgomi: There is a big thread on BigMike's about this change in NT7 where OnMarketData() triggers prior to OnBarUpdate(); I actually like that if you are primarily work on tick based data. Also FirstTickOfBar is tied to OnBarUpdate() only and its value should not be relied on in the OnMarketData() call.
This is more logical, and now you can keep your repaint code in OnBarUpdate and don't have to put in OnMarketData.
Drawback is that you have to move your bar reinit code in OnMarketData, thus putting Bar logic in OnMarketData....
And of course all the indicator that reinit stuff in OnBarUpdate have to be rewritten....
Comment
-
After a few tests, this is going to be a PITA because OMD fires before OBU which is cool, but in the case of the first tick of a new bar CurrentBar hasn't the correct value in OMD, so you can't simply put your if CurrentBar>lastBar in OMD, it won't work...
So guess will have to do some danjurgens hacking, storing ticks and taking them out in case of a new bar...
Comment
-
Originally posted by gomifromparis View PostIf you wathc carefully a 1 tick chart you will see this is not really the case. But the tick splitting on the bars of same timestamp could be improved.
Yes, I like the fact that now OMD fires before OBU so when you're in OnBarUpdate you have the OMD info that triggered it.
This is more logical, and now you can keep your repaint code in OnBarUpdate and don't have to put in OnMarketData.
Drawback is that you have to move your bar reinit code in OnMarketData, thus putting Bar logic in OnMarketData....
And of course all the indicator that reinit stuff in OnBarUpdate have to be rewritten....
I'm the one who uncovered the FirstTickOf Bar problem. I have an OCD issue when it comes to accuracy.
I have updated GomCD with a fix for the non cumulative mode which has the "problem". Cumulative mode is working fine and needs no adjustment.
Here are the proposed changes in Bold.
-------------------------------------------------------------------------------------------------------------------------
Define Variable in variable area - protected int lastdelta = 0;
DeltaValue.Set(dsClose.Get(CurrentBar));
if (startbar==-1)
startbar=CurrentBar;
lastcalcbar=CurrentBar;
if ((chart==GomCDChartType.NonCumulativeChart)&&(Firs tTickOfBar)&&(!Historical))totalvolume += lastdelta; //---added----
}
//void ProcessDelta(int delta, bool firstTick)
protected override void GomOnMarketData(TickTypeEnum tickType,double price,int volume,bool firstTickOfBar)
{
lastdelta = delta=CalcDelta(tickType,price,volume); //--------------- NT Fix for 1st Tick Being Dropped ----
int delta=CalcDelta(tickType,price,volume);
totalvolume += delta;
--------------------------------------------------------------------------------------------------------------------------------
It could probably be done better. I have tested this and it works great for me!!!
If it works for you, I leave it to you to release an updated GomCD.
RJay
Comment
-
Nice find of yours, RJay, well done !
I'll take a look at your patch, but I'll try first to modify the recorder so I don't have to mod all my indies.
Thanks again.
Comment
-
Gomi,
As I have said in my prior post, I am am accuracy nut.
I have been studying the GomRecorderIndicator and I would like to propose a change.
The following code seems a bit dodgy for me.
-----------------------------------------------------------------------------------------------------------------------------
if (ask<bid) // should not happen but does
{
if (price<ask) tickType=TickTypeEnum.BelowBid;
else if (price==ask) tickType=TickTypeEnum.AtAsk;
else if (price<bid) tickType=TickTypeEnum.BetweenBidAsk;
else if (price==bid) tickType=TickTypeEnum.AtBid;
else tickType=TickTypeEnum.AboveAsk;
}
else if (bid<ask) //normal case
{
if (price<bid) tickType=TickTypeEnum.BelowBid;
else if (price==bid) tickType=TickTypeEnum.AtBid;
else if (price<ask) tickType=TickTypeEnum.BetweenBidAsk;
else if (price==ask) tickType=TickTypeEnum.AtAsk;
else tickType=TickTypeEnum.AboveAsk;
}
else //bid==ask, should not happen
{
if (price<bid) tickType=TickTypeEnum.BelowBid;
else if (price>ask) tickType=TickTypeEnum.AboveAsk;
else tickType=tickType=TickTypeEnum.BetweenBidAsk;
}
---------------------------------------------------------------------------------------------------------
I propose it be replaced with this simpler, more clearly defined code.
With this proposed change, every tick gets counted. No "cracks" in the code for ticks to "slip through".
Any tick that can't be defined gets stuffed "Between" where it can still be counted.
----------------------------------------------------------------------------------------------------------
if ((price<bid)&& (bid != 0)) tickType=TickTypeEnum.BelowBid;
else if ((price==bid)&& (bid != 0)) tickType=TickTypeEnum.AtBid;
else if ((price==ask)&& (ask != 0)) tickType=TickTypeEnum.AtAsk;
else if ((price>ask)&& (ask != 0)) tickType=TickTypeEnum.AboveAsk;
else tickType=TickTypeEnum.BetweenBidAsk;
-----------------------------------------------------------------------------------------------------------
Also,the following change will also be needed if the previous one is implemented.
Replaced commented line with the one following:
-------------------------------------------------------------------------------------
// if (!initBidAsk)initBidAsk=(ask>bid);
if (!initBidAsk)initBidAsk = true;
------------------------------------------------------------------------------------
I have tested this and it works quite well for me.
Again, your indicator, your call, I leave it up to you.
Love your stuff,
RJay
Comment
-
Well basically the code you propose is the same as my if (bid < ask) part.
If bid==ask all your volume will be counted on the bid side.
If ask<bid and price between bid and ask all the volume will be counted on the bid side,even if it's actually between the bid and the ask.
Sorry, all problems don't have simple solutions :-)
PS : please point out where the ticks might "escape" or "slip through" ?
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by jxs_xrj, 01-12-2020, 09:49 AM
|
5 responses
3,289 views
1 like
|
Last Post
by jgualdronc
Today, 10:47 AM
|
||
Started by Touch-Ups, Today, 10:36 AM
|
0 responses
5 views
0 likes
|
Last Post
by Touch-Ups
Today, 10:36 AM
|
||
Started by geddyisodin, 04-25-2024, 05:20 AM
|
8 responses
61 views
0 likes
|
Last Post Yesterday, 10:45 AM | ||
Can someone turn this thinkscript into a ninjascript. 5PM CST OHL and Previous Day
by Option Whisperer
Started by Option Whisperer, Today, 09:55 AM
|
0 responses
5 views
0 likes
|
Last Post Today, 09:55 AM | ||
Started by halgo_boulder, 04-20-2024, 08:44 AM
|
2 responses
24 views
0 likes
|
Last Post Today, 09:41 AM |
Comment