![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| NinjaScript File Sharing Discussion Discussion for shared NinjaScript files. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Oct 2008
Posts: 25
Thanks: 0
Thanked 1 time in 1 post
|
Attached is a simple midpoint indicator which dynamically draws a midpoint line - to watch the 50% retracement.
My problem is Ideally I would like an indicator that calculates from the 9:30 open as I have a 24 hour 1min ES chart. I set the Session begins and End to 4:15pm so that I can use the PriorDayOHLC indicator. Changing session begins and end to 9:30am stuffs up the PriorDayOHLC indicator (the 4:15 close). I'm a new NT user so does anybody have suggestions, tips etc. TIA |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Could you clarify?
- You want to plot on a 24 hour chart but calculate data based on a defined session or; - Plot on a chart with a defined session but calculate off of 24 hour data? If the latter, this is not possible.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Oct 2008
Posts: 25
Thanks: 0
Thanked 1 time in 1 post
|
Hi Ray
Firstly slightly different question, which may help with my middle indicator Futures traders commonly want to show yesterdays High, Low and close (4:15pm) on a 24hr chart. Can this be done? If I define session is 9:30 to 4:15, I cannot display globex data. This must be a common question? "- Plot on a chart with a defined session but calculate off of 24 hour data" This picture is what I ideally want, of an indicator I dont have access to (the lines mainly). I added the 50% line, considering they calculated the OR (open range) lines it must be possible to calculate and draw a 50% of current range line (9:30:to 4:15pm) If anybody knows of some way of coding something similar or one I could purchase please let me know. |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Oct 2008
Posts: 25
Thanks: 0
Thanked 1 time in 1 post
|
If I use the code
if (ToTime(Time[0])>=093000 && ToTime(Time[0])<161500) { High[y]; ///how to get the highest high during the period? } Then I could draw a horizontal line, but how could I reference the X points on the chart for the start and end times of the line? (ToTime(Time[0])>=093000 && ToTime(Time[0])<161500) |
|
|
|
|
|
#5 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Hi Brutus,
To get the highest high you will want to use MAX(High, 20)[0] or something like that at the end of the time period. You need to calculate how many bars are included in your specific time period to pass in for the period parameter.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Globex session indicator | Angel | Indicator Development | 12 | 07-13-2012 02:10 AM |
| Last bar of session doesn't have indicators until next session begins | cunparis | Charting | 8 | 11-04-2008 06:45 AM |
| Changing Session Begins and Session Ends time | forexample | Charting | 1 | 10-21-2007 01:16 AM |
| SMA of Midpoint | nybangali | Indicator Development | 5 | 08-20-2007 02:09 AM |
| How to plot an indicator only on the current session | max1ci6 | Indicator Development | 2 | 04-24-2007 07:50 PM |