Go Back   NinjaTrader Support Forum > NinjaScript File Sharing > NinjaScript File Sharing Discussion

NinjaScript File Sharing Discussion Discussion for shared NinjaScript files.

NinjaTrader
Reply
 
Thread Tools Display Modes
Old 03-08-2016, 06:16 AM   #241
NathanO
Junior Member
 
Join Date: Sep 2014
Posts: 13
Thanks: 0
Thanked 0 times in 0 posts
Default

dragging up and old thread but hoping someone can point me in the right direction. I have been given and indicator that looks like it's come from this dvalue code. But I'm having a problem with it, and I have also seen the same issue using the dvalue code from this thread.

I looks like it's not detecting the session times correctly

http://screencast.com/t/EY1IUbBow

you can see on this screenshot some days are being plotted as pre session (red) which therefore means the developing levels are not correct and also on the next day the "yesterday levels" are wrong..

has anyone seen this before. I'm thinking it could be some sort of more generic issue with the code rather than specific to this indicator???

Thanks
Nathan
NathanO is offline  
Reply With Quote
Old 03-09-2016, 01:22 PM   #242
NinjaTrader_PatrickH
NinjaTrader Customer Service
 
NinjaTrader_PatrickH's Avatar
 
Join Date: Jul 2011
Location: Denver, CO
Posts: 11,662
Thanks: 783
Thanked 2,014 times in 1,940 posts
Default

Hello NathanO,

Thank you for your post.

I am not familiar with that indicator. It is protected in a dll or do you have access to the source?
NinjaTrader_PatrickH is online now  
Reply With Quote
Old 02-06-2017, 02:33 PM   #243
ericson
Member
 
Join Date: Nov 2013
Posts: 69
Thanks: 0
Thanked 2 times in 2 posts
Default

2/6/2017 11:55:20 AM,Default,Indicator 'DValueArea': Error on calling 'OnRender' method on bar 505: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.,

Im getting this after loading a charts with the indicator.
ericson is offline  
Reply With Quote
Old 02-07-2017, 06:45 AM   #244
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 26,245
Thanks: 496
Thanked 1,866 times in 1,796 posts
Default

ericson, is this your script or did you download it the forums somewhere? Likely the OnRender() handling of brushes would need to be updated, as reference item you could check for example into - http://ninjatrader.com/support/forum...ad.php?t=85099
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 02-07-2017, 03:26 PM   #245
ericson
Member
 
Join Date: Nov 2013
Posts: 69
Thanks: 0
Thanked 2 times in 2 posts
Default

http://ninjatrader.com/support/forum...atid=7&lpage=1

Not sure, but i think if i load on too many charts, or set process priority higher, or scroll too far to the left of the chart. Not sure.

I edited it by declaring some of variables before onbarupdate, but didn't help.
ericson is offline  
Reply With Quote
Old 02-08-2017, 03:42 AM   #246
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 26,245
Thanks: 496
Thanked 1,866 times in 1,796 posts
Default

Thanks ericson, we will check into it.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 02-09-2017, 10:30 AM   #247
NinjaTrader_ChelseaB
NinjaTrader Customer Service
 
NinjaTrader_ChelseaB's Avatar
 
Join Date: Dec 2012
Location: Denver, CO
Posts: 8,975
Thanks: 127
Thanked 1,971 times in 1,833 posts
Default

Hello ericson,

I've made some changes to the DValueArea for NinjaTrader 8 to update this to the latest version.

Can you test this updated version and let me know if you are still getting errors?

http://ninjatrader.com/support/forum...php?linkid=837
NinjaTrader_ChelseaB is offline  
Reply With Quote
Old 02-09-2017, 02:38 PM   #248
ericson
Member
 
Join Date: Nov 2013
Posts: 69
Thanks: 0
Thanked 2 times in 2 posts
Default

Yes I will. Thank you. Which code was altered? Only Onrender section?
Last edited by ericson; 02-09-2017 at 02:49 PM.
ericson is offline  
Reply With Quote
Old 02-09-2017, 03:23 PM   #249
NinjaTrader_ChelseaB
NinjaTrader Customer Service
 
NinjaTrader_ChelseaB's Avatar
 
Join Date: Dec 2012
Location: Denver, CO
Posts: 8,975
Thanks: 127
Thanked 1,971 times in 1,833 posts
Default

Hi ericson,

The sessionIterator is moved to be created in State.DataLoaded.

Added !IsInHitTest to OnRender().
NinjaTrader_ChelseaB is offline  
Reply With Quote
The following user says thank you to NinjaTrader_ChelseaB for this post:
Old 02-20-2017, 08:02 PM   #250
ericson
Member
 
Join Date: Nov 2013
Posts: 69
Thanks: 0
Thanked 2 times in 2 posts
Default

Hi, wanted to get back to you. Indicator seems to be error free now!

Is it normal to have 5% cpu load with indy, one chart, with COBC?

I remove it, cpu is about 1%

UPDATE: Seems zorder putbehind option when true causes excessive cpu load.

Also, i highly suggest declaring variables in the beginning of the script, those that can be, to improve performance. That way the variables are allocated a permanent memory space, rather than creating new ones each processing event.
Last edited by ericson; 02-21-2017 at 02:38 PM.
ericson is offline  
Reply With Quote
Old 02-21-2017, 06:09 PM   #251
ericson
Member
 
Join Date: Nov 2013
Posts: 69
Thanks: 0
Thanked 2 times in 2 posts
Default

How can i go about accessing the market profile data?

It looks like its stored in two dimensional array "priceHitsArray". 2 columns, # however many slots. I assume columns are for prices and their total volume?

How could another indicator access it to use or analyze?


UPDATE: Solved this issue by creating a new indicator
Last edited by ericson; 02-21-2017 at 11:22 PM.
ericson is offline  
Reply With Quote
Old 02-23-2017, 12:49 PM   #252
NinjaTrader_ChelseaB
NinjaTrader Customer Service
 
NinjaTrader_ChelseaB's Avatar
 
Join Date: Dec 2012
Location: Denver, CO
Posts: 8,975
Thanks: 127
Thanked 1,971 times in 1,833 posts
Default

Hello ericson,

Please consult with the original author of the script, DeanV, for specifics about usage and requests for changes.
NinjaTrader_ChelseaB is offline  
Reply With Quote
Old 12-18-2017, 09:48 PM   #253
johnnymustard
Member
 
Join Date: Feb 2012
Posts: 44
Thanks: 1
Thanked 6 times in 2 posts
Default RtVAH & RtVAL to compliment RtPOC

DeanV, I like so many others greatly appreciate your fine work here. It is a huge help.

1) I just finished reading the entire thread going back to 2009 and NT6.5 (apparently there
is a real-time version for 6.5). There aren't any working models (RtValueArea)
for NT7 or 8 that I can find. There're at least a couple dozen requests for this feature
over the past 9-ish years. DeanV did all the heavy lifting by creating this beauty in the
first place, Thank you DeanV.
Can someone please implement this long overdue, highly anticipated feature for the NT8 version of DValueArea?

2) Q: Post 197 on https://ninjatrader.com/support/foru...DValue&page=14
"How can I have evolving VAH and VAL plotted on the chart (like Evolving POC)?"

A: Post 199 on https://ninjatrader.com/support/foru...DValue&page=14
"You'll have to write some code if you want the historical real-time value area.
Just add two more plots and look at how the RtPOC was called to duplicate."

Based on the authors response, it looks mighty simple for someone that knows what they're doing.
If someone will tell me where to place these two plots and
what I need to reconfigure from RtPOC to find RtVAH & RtVAL, I will make the changes and post it.

3) Can anyone point me to the code I'd have to change to have yesterdays VA plot on yesterday rather than today?
See pic "VA_shift".

4) I've included the most recent version of DValueArea I can find.

I thank all in advance for any guidance and especially DeanV.
Attached Images
File Type: jpg VA_shift.jpg (233.3 KB, 110 views)
Attached Files
File Type: zip DValueArea_NT8.zip (12.7 KB, 56 views)
Last edited by johnnymustard; 12-19-2017 at 05:13 AM.
johnnymustard is offline  
Reply With Quote
Old 12-21-2017, 11:39 AM   #254
NinjaTrader_ChelseaB
NinjaTrader Customer Service
 
NinjaTrader_ChelseaB's Avatar
 
Join Date: Dec 2012
Location: Denver, CO
Posts: 8,975
Thanks: 127
Thanked 1,971 times in 1,833 posts
Default

Hello johnnymustard,

I wanted to note that if you are not able to find a community member on the forums to implement the logic you are requesting, you can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.

As far a creating a plot, this done with the AddPlot() method in OnStateChange when State is State.SetDefaults.

Adding a plot creates an index in the Values collection that allows you to set the value for the plot to whatever value you would like.

Below are publicly available links to the help guide.
https://ninjatrader.com/support/help...us/addplot.htm
https://ninjatrader.com/support/help...-us/values.htm
NinjaTrader_ChelseaB is offline  
Reply With Quote
Old 06-18-2018, 09:14 PM   #255
oldporkchops
Junior Member
 
Join Date: Dec 2016
Posts: 15
Thanks: 3
Thanked 1 time in 1 post
Lightbulb Evolving VAL and VAH

Thanks for your hard work on the latest iteration of the DValue indicator. It has improved my trading.

The settings allow for the evolving VAH and VAL to plot as lines just like the real time POC. However, no lines appear for the evolving VAL and VAH.

Can someone please help?

Thanks.
oldporkchops is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Entering Trades When Price Away from Key Areas of Support & Resistance dgregor5 Strategy Development 4 01-19-2008 03:40 PM
Shading areas of chart? higler Platform Technical Support 3 05-01-2007 07:58 AM


All times are GMT -6. The time now is 01:34 PM.

Futures, foreign currency and options trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. View Full Risk Disclosure.

CFTC Rules 4.41 - Hypothetical or Simulated performance results have certain limitations, unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

This website is hosted and operated by NinjaTrader, LLC (“NT”), a software development company which owns and supports all proprietary technology relating to and including the NinjaTrader trading platform. NT is an affiliated company to NinjaTrader Brokerage (“NTB”), which is a NFA registered introducing broker (NFA #0339976) providing brokerage services to traders of futures and foreign exchange products. This website is intended for educational and informational purposes only and should not be viewed as a solicitation or recommendation of any product, service or trading strategy. No offer or solicitation to buy or sell securities, securities derivative or futures products of any kind, or any type of trading or investment advice, recommendation or strategy, is made, given, or in any manner endorsed by any NT affiliate and the information made available on this Web site is not an offer or solicitation of any kind. Specific questions related to a brokerage account should be sent to your broker directly. The content and opinions expressed on this website are those of the authors and do not necessarily reflect the official policy or position of NT or any of its affiliates. 

Vendors along with their websites, products and services, collectively referred to as (“Vendor Content”), are independent persons or companies that are in no manner affiliated with NT or any if its affiliates. NT or any of its affiliates are not responsible for, do not approve, recommend or endorse any Vendor Content referenced on this website and it’s your sole responsibility to evaluate Vendor Content. Please be aware that any performance information provided by a vendor should be considered hypothetical and must contain the disclosures required by NFA Rule 2-29(c). If you are interested in learning more about, or investigating the quality of, any such Vendor Content you must contact the vendor, provider or seller of such Vendor Content. No person employed by, or associated with, NT or any of its affiliates is authorized to provide any information about any such Vendor Content.