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
Strategy Builder parsing out key price levels?
Collapse
X
-
Strategy Builder parsing out key price levels?
I am building a strategy for the mym that buys and sells at key price levels, but since the dow moves up and down so many hundreds of points it makes sense to somehow parse out the price and then ignore the first two digits. For example if the dow is now at 29713 maybe I want to have a stop 5 points below 29793 and take profit at 29780, but I don't want to have a giant list of prices for every hundred or thousand points, just parse out the last 3 digits and have 4 or 5 key levels to put take profit or stop. Is there any way the strategy builder can do this or can you point me to the code that can accomplish this? In other words parse out the price and then put the stop or take profit above or below that price but one piece of code works for all prices? -
Hello terminatorT1000,
Thank you for the post.
If you are looking to offset from a price the builder could do that, you can use the builders arithmetic functions to add or subtract a number of ticks from a given price. When you are making a condition you would see the Offset listed and from within the offset area you can define the type of offset and amount.
The stops and targets page could not be used in this way if you wanted to calculate a price yourself, you can however use a fixed offset from the stops and targets page like 8 ticks which would be calculated based on the entry price.
To otherwise parse or check a part of the whole number would require manual coding.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
- Likes 1
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by bortz, 11-06-2023, 08:04 AM
|
47 responses
1,602 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
12 views
0 likes
|
Last Post
by Javierw.ok
Today, 04:12 PM
|
Comment