Is there any comfortable way, how to get the price on the trend-line at specific bar?
Announcement
Collapse
No announcement yet.
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.
:http://www.ninjatrader.com/support/h.../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 ?
http://www.ninjatrader.com/support/f...948#post385948
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 YevhenShynkarenko, Yesterday, 01:22 AM
|
2 responses
36 views
0 likes
|
Last Post
|
||
Started by testingsarasa, 05-20-2018, 02:50 PM
|
11 responses
733 views
0 likes
|
Last Post
|
||
Started by martyn73, Today, 05:27 PM
|
1 response
7 views
0 likes
|
Last Post
|
||
Started by MichaelAlexander, 02-22-2017, 05:06 AM
|
5 responses
1,402 views
0 likes
|
Last Post
|
||
Started by walter739, Today, 11:56 AM
|
3 responses
11 views
0 likes
|
Last Post
|
Comment