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 usazencort, Today, 01:16 AM
|
0 responses
1 view
0 likes
|
Last Post
by usazencort
Today, 01:16 AM
|
||
Started by kaywai, 09-01-2023, 08:44 PM
|
5 responses
603 views
0 likes
|
Last Post Today, 12:32 AM | ||
Started by xiinteractive, 04-09-2024, 08:08 AM
|
6 responses
22 views
0 likes
|
Last Post Today, 12:31 AM | ||
Started by Pattontje, Yesterday, 02:10 PM
|
2 responses
21 views
0 likes
|
Last Post
by Pattontje
Yesterday, 11:49 PM
|
||
Started by flybuzz, 04-21-2024, 04:07 PM
|
17 responses
230 views
0 likes
|
Last Post
by TradingLoss
Yesterday, 11:45 PM
|
Comment