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
1st Hour High/Low
Collapse
X
-
Hello Bdg820,
A ray line will be continuous when a line can have specific starting and ending coordinates. I would advise to use a Horizontal Line and then remove the drawing object when you are done using it. You can also just call the line below and it will change the drawing object tagged "My Horizontal Line" each time it is called. Therefore, if you call it once a day it will update that line once a day.
NinjaTrader 7:
Code:DrawHorizontalLine("My Horizontal Line" + CurrentBar, PriorDayOHLC().PriorHigh[0], Color.Blue);
Code:Draw.HorizontalLine(this, @"My Horizontal Line", false, PriorDayOHLC().PriorHigh[0], Brushes.CornflowerBlue, DashStyleHelper.Solid, 2);
NinjaTrader 7 - http://ninjatrader.com/support/helpG...drawobject.htm
NinjaTrader 8 - https://ninjatrader.com/support/help...drawobject.htmJimNinjaTrader Customer Service
Comment
-
Previous Hour High Low
Originally posted by Harry View PostSomething like an opening range indicator that plots the initial balance (first hour of regular trading) and the night session range?
I've been searching for an indicator to just show the previous Hours high and low on the 5 minute chart extending into the current hour trading and then changing on the close of the hour. At the moment I'm changing the two horizontal lines manually at the end of each hour on 6 charts. Any help would be greatly appreciated.
Comment
-
Welcome to the forums SteveAU!
I'm not sure of an indicator that does this exact task, but maybe another member of forums may know of one.
If you would like to program this yourself, you could use an additional data series for the hourly high/low, and then incorporate time checks to draw a line between the 5 minute bar that opens a new hour and the current bar until the CurrentBar reaches the end of an hour. I'll include some resources to accomplish this below. The reference sample has additional information on the components used in the example.
Working with Price Data - https://ninjatrader.com/support/help...rice_data2.htm
Multi Series NinjaScripts (Important Read!) - https://ninjatrader.com/support/help...nstruments.htm
Time filters example strategy - https://ninjatrader.com/support/foru...ead.php?t=3226
DrawLine() - https://ninjatrader.com/support/help.../?drawline.htm
Otherwise, we could we could have a representative of our EcoSystem provide additional information on NinjaScript Consultants who would be happy to make this script for you.
If you would like us to provide any of that information for you, please let us know.JimNinjaTrader Customer Service
Comment
-
Hi,
thanks for your reply. I'm looking for an indicator which shows lines across to the y axis with tags for the high and the low for the previous hour, 4 hour, daily, weekly and monthly. All of which update to the newest previous hour, 4 hour, daily, week, month once the current one has closed. Is that possible ?
Kind Regards,
Steve
Comment
-
Hello SteveAU,
Yes, this sort of script is possible to create.The information provided in my previous message could be referenced to construct an indicator that accomplishes that task. You could also use DrawRay instead of DrawLine.
DrawRay - https://ninjatrader.com/support/help...7/?drawray.htm
If you add a data series for each time frame you would like to check and then update each price level and barsAgo index for your DrawLines or DrawRays when that time frame's bar closes, you can achieve this result. The Multi Series NinjaScripts documentation provides a complete walk through for how you can create this logic.
I may suggest creating simple scripts that only create one or a few Lines or Rays so you can get more acquainted with the drawing methods and writing the correct syntax before incorporating the logic in a Multi Series NinjaScript.
If are looking for services to have someone write this indicator for you, I can have a representative of our EcoSystem provide you information on NinjaScript Consultants.
Could I confirm that you would like to create this yourself, or were you looking to have someone write this script for you?
Please let us know how we can assist you further.JimNinjaTrader Customer Service
Comment
-
Looking to create the variable First Thirty minute Low each session..
if (BarsInProgress == 1
&& Bars.PercentComplete > 0.07407
&& Bars.PercentComplete < 0.074072)
{
ESFTMFLOW = CurrentDayOHL(Lows[1]).CurrentLow[0];
}
But on doing a print check later in the session the variable prints 0..... thoughts why this might be the case? Does the variable only exist during that defined time window?
Regards
Comment
-
Hello elliot5,
The 0 would indicate the value was not set when you printed it. Your variable will only be set when that condition happens so if you Print happened before the condition it would be 0. For this type of question you generally are going to need to use more Prints to find out what happened, likely adding a print before the condition will help. Printing the Bars.PercentComplete during BarsInProgress == 1 would be one way to see why the condition failed. Otherwise if the condition was true that would let you move to checking other items inside your condition like the value of the indicator to see if that is what is 0.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Comment
-
Originally posted by elliot5 View PostPerhaps to get the first half hour of session Hi/lo it would be easier to add a one minute series and use other logic.
We have such an indicator available that plots the opening range for the first 30 minutes (or any period set in minutes or seconds). Opening time for the regular session is preset for most of the futures contracts. A sample chart is attached.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by bortz, 11-06-2023, 08:04 AM
|
47 responses
1,606 views
0 likes
|
Last Post
by aligator
Today, 07:22 PM
|
||
Started by jaybedreamin, Today, 05:56 PM
|
0 responses
8 views
0 likes
|
Last Post
by jaybedreamin
Today, 05:56 PM
|
||
Started by DJ888, 04-16-2024, 06:09 PM
|
6 responses
18 views
0 likes
|
Last Post
by DJ888
Today, 05:12 PM
|
||
Started by Jon17, Today, 04:33 PM
|
0 responses
4 views
0 likes
|
Last Post
by Jon17
Today, 04:33 PM
|
||
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
13 views
0 likes
|
Last Post
by Javierw.ok
Today, 04:12 PM
|
Comment