Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Can I access "Offset" and "Rollover date" from NinjaScript code?
Collapse
X
-
That's great, exactly what I need. Very comfortable realisation. Thank You!
This work for me:
if (Instrument.MasterInstrument.MergePolicy == MergePolicy.MergeBackAdjusted)
level.price_to_plot = level.price_from_xml + Instrument.GetOffsetSum( level.begin_time );
else
level.price_to_plot = level.price_from_xml;Last edited by fx.practic; 11-04-2014, 03:12 PM.
-
Hello fx.practic,
Thank you for your post.
You can find an example at the following link: http://www.ninjatrader.com/support/f...d=4&linkid=558
Leave a comment:
-
Can I access "Offset" and "Rollover date" from NinjaScript code?
I made XML file that contain historical supp \ res levels, like this:
HTML Code:<levels instrument ="CL" tf="H1"> <l beg="19.08.2014 19:00:00" pr="110.20" end="25.08.2014 20:00:00" tag="sup" /> <l beg="19.09.2014 05:00:00" pr="110.30" end="30.08.2014 19:00:00" tag="res" /> <l beg="23.09.2014 17:00:00" pr="105.01" end="03.09.2014 03:00:00" tag="sup" /> <l beg="03.10.2014 18:00:00" pr="106.17" end="19.09.2014 05:00:00" tag="res" /> </levels>
I use Merge policy "MergeBackAdjusted" only.
As for as I understand, after every expiration date chart jump up or down on (offset / TicksSize) ticks, but levels will plotted on fixed price (specified in XML file).
The question: is there any way to access from indicator code "Offset" and "Rollover date" values to adjust levels prices after each expiration?Last edited by fx.practic; 11-02-2014, 12:43 PM.
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by terofs, Yesterday, 04:18 PM
|
1 response
21 views
0 likes
|
Last Post
by terofs
Today, 10:14 AM
|
||
Started by CommonWhale, Today, 09:55 AM
|
1 response
3 views
0 likes
|
Last Post Today, 10:11 AM | ||
Started by Gerik, Today, 09:40 AM
|
2 responses
7 views
0 likes
|
Last Post
by Gerik
Today, 10:04 AM
|
||
Started by RookieTrader, Today, 09:37 AM
|
2 responses
12 views
0 likes
|
Last Post
by RookieTrader
Today, 10:02 AM
|
||
Started by alifarahani, Today, 09:40 AM
|
1 response
7 views
0 likes
|
Last Post Today, 10:01 AM |
Leave a comment: