Is there any comfortable way, how to get the price on the trend-line at specific bar?
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
Detect price on the trend line
Collapse
X
-
misova, not directly unfortunately - what you could check via the DrawObjects collection and the IDrawObject interface are the anchor points for example as properties.
:https://www.ninjatrader.com/support/.../nt7/iline.htm
A sample script as starting point that works with those tools to give alerts for manual drawn lines could be found here in our sharing - http://www.ninjatrader.com/support/f...d=4&linkid=472BertrandNinjaTrader Customer Service
-
Thank you,
so as I think about it, then the only way how to calculate price of the trend line
on specific bar is to:
- Calculate a linear function y = Ax + B from those 2 anchor points
- and then use this function to calculate y-value (price) for other bars (x) ?
Do you think this is good direction ?
Comment
-
Thank you,
so as I think about it, then the only way how to calculate price of the trend line
on specific bar is to:
- Calculate a linear function y = Ax + B from those 2 anchor points
- and then use this function to calculate y-value (price) for other bars (x) ?
Do you think this is good direction ?
where the solution was to find the linear equation of a ray - effectively the same thing.
It sounds as if you have the math (good old coordinate geometry from high school !) but if you need a hand, please let me know.
As I said there, I've done precisely this recently and it's extremely effective - I'm able to get the level of the line at any bar.
Hope it all work out.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by AttiM, 02-14-2024, 05:20 PM
|
12 responses
212 views
0 likes
|
Last Post
by DrakeiJosh
Today, 11:17 AM
|
||
Started by cre8able, 02-11-2023, 05:43 PM
|
3 responses
236 views
0 likes
|
Last Post
by rhubear
Today, 10:46 AM
|
||
Started by frslvr, 04-11-2024, 07:26 AM
|
8 responses
115 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
|
||
Started by rocketman7, Today, 09:41 AM
|
3 responses
11 views
0 likes
|
Last Post Today, 10:07 AM |
Comment