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
How do you execute a strategy in one shot?
Collapse
X
-
Hello,
Thank you for the question. I am unsure I understand the logic you are asking.
NinjaTrader has several ways you can process data, for example you can go from historical to realtime on a bar to bar basis. You can skip historical and start processing on realtime data. You can skip historical and process in realtime data, and also at a later time reference historical bars. Everything would relate to a linear timeline though and would be processed on each tick or on each bar close.
Can you provide more description on the type of analysis you are seeking? I could see if there is a way to accomplish that.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
-
Hi Jesse! Thanks for responding.
I think I need to work with the DataSeries class:
I would like to consume all the datapoints in the chart and then parse the data for things like the Highest high, Lowest low, Volume, etc... and then make a trading decision based on the outcome of my algorithm. I was wondering if I could find some code showing how that might be put together. Anything ot get me started on the right track would be much appreciated.
Thank You,
Rob
Comment
-
Hello,
Thank you for the question.
You could certainly run a loop over all of the avaliable data to determine the highest or lowest points in the series. Depending if you needed to break for the session there may already be indciators that accomplish the tasks needed.
For example the CurrentDayOHL indicator will get the High and Low of the current session. There is also a PriorDayOHLC indicator which does the same for the prior session. If you needed to lowest and highest bar of all time, you could do that as well looping through all of the data.
NinjaTrader uses standard C# for its language, so a for loop would suffice. You can determine the amount of bars on the chart by using Count - 1. A simple loop may include:
for(int i = 0; i< Count - 1; i++)
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by giulyko00, Today, 12:03 PM
|
0 responses
2 views
0 likes
|
Last Post
by giulyko00
Today, 12:03 PM
|
||
Started by AttiM, 02-14-2024, 05:20 PM
|
12 responses
213 views
0 likes
|
Last Post
by DrakeiJosh
Today, 11:17 AM
|
||
Started by cre8able, 02-11-2023, 05:43 PM
|
3 responses
238 views
0 likes
|
Last Post
by rhubear
Today, 10:46 AM
|
||
Started by frslvr, 04-11-2024, 07:26 AM
|
8 responses
117 views
1 like
|
Last Post Today, 10:30 AM | ||
Started by stafe, 04-15-2024, 08:34 PM
|
10 responses
47 views
0 likes
|
Last Post
by stafe
Today, 10:29 AM
|
Comment