Does this mean that line 67 should be broken and print added on line 68?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
About Net change
Collapse
X
-
Thank you for your reply.
How many days of historical data is being processed?
May I have you print the time and the value of both Bars.IsFirstBarOfSession and Bars.IsLastBarOfSession above the condition that sets these variables?
Does this mean that line 67 should be broken and print added on line 68?
-
Hello ラリー,
I'm not certain what you are asking but I am not advising you to remove anything.
I am advising you print the values in the condition to understand why the condition is not evaluating as true at the time you are expecting. The print should be above the condition. The print should include labels.
Below is a link to a forum post that demonstrates using Print() to understand behavior. Please watch the NinjaScript Editor 401 video linked in the post that demonstrates using prints.
Chelsea B.NinjaTrader Customer Service
Comment
-
Hello ラリー ,
If there is code line 1, and there is code on line 2, the code on line 1 is above the code on line 2.
If the condition is to compare the open to the close. if (Open[0] > Close[0])
My print of the values in that condition would be one line number less than the line number of the condition (above).
Print(string.Format("{0} | Open[0]: {1} > Close[0]: {2}", Time[0], Open[0], Close[0])); // <-- this print is above the condition below
if (Open[0] > Close[0]) // <-- this condition is below the print above
Please note, C# programming education comes prerequisite to writing NinjaScript code. The Strategy Builder can be used to see how it generates C# syntax, but please be aware that it is not with our Scripting Support team's scope to provide programming education services or to check your syntax. We highly recommend getting further acquainted with C# through a formal class, or through educational resources that can be found external to NinjaTrader.
Below I am providing a link to a forum post with helpful resources on getting started with C# and includes links to 3rd party tutorials.
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 NinjaTrader Ecosystem team follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request or provide one on one educational services.Chelsea B.NinjaTrader Customer Service
Comment
-
Thank you for your reply.
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 NinjaTrader Ecosystem team follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request or provide one on one educational services.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Allwest, Yesterday, 10:25 PM
|
2 responses
18 views
0 likes
|
Last Post Today, 04:18 AM | ||
Started by bmandonlidal, Today, 03:34 AM
|
0 responses
1 view
0 likes
|
Last Post
by bmandonlidal
Today, 03:34 AM
|
||
Started by LincolnOrtiz, Today, 03:10 AM
|
0 responses
2 views
0 likes
|
Last Post
by LincolnOrtiz
Today, 03:10 AM
|
||
Started by Dr Kerry, Today, 02:03 AM
|
0 responses
4 views
0 likes
|
Last Post
by Dr Kerry
Today, 02:03 AM
|
||
Started by AndriXF7, 12-06-2023, 10:09 AM
|
5 responses
163 views
1 like
|
Last Post
by Lunorri
Today, 01:56 AM
|
Comment