I am wondering how to reference a certain value/ point on chart later on in a strategy/ ninjascript. Say a defined condition happens and you want to "bookmark" a certain value and reference it later. How would you do that? thanks
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to reference value later on in strategy
Collapse
X
-
How to reference value later on in strategy
Hello
I am wondering how to reference a certain value/ point on chart later on in a strategy/ ninjascript. Say a defined condition happens and you want to "bookmark" a certain value and reference it later. How would you do that? thanksTags: None
-
Hello behindthewheel,
Thanks for your post.
You could check CurrentBar to see the bar index when this occurred and assign the value to a variable. If you need to reference that bar later on in the script, you can use a BarsAgo reference like the following: Close[CurrentBar - YourVariable] (This will return the Close price for when you gave YourVariable a value.)
We look forward to being of further assistance.JimNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by arvidvanstaey, Today, 02:19 PM
|
4 responses
11 views
0 likes
|
Last Post Today, 04:08 PM | ||
Started by samish18, 04-17-2024, 08:57 AM
|
16 responses
61 views
0 likes
|
Last Post
by samish18
Today, 03:30 PM
|
||
Started by jordanq2, Today, 03:10 PM
|
2 responses
9 views
0 likes
|
Last Post
by jordanq2
Today, 03:23 PM
|
||
Started by traderqz, Today, 12:06 AM
|
10 responses
18 views
0 likes
|
Last Post
by traderqz
Today, 02:49 PM
|
||
Started by algospoke, 04-17-2024, 06:40 PM
|
5 responses
48 views
0 likes
|
Last Post Today, 02:36 PM |
Comment