As an example of the type of operation I am trying to do, lets use an ATR based profit target as an example. I would like to update the value of ATR and store it in a variable at the end of every bar ATRval, then I will create an input that is called profitTargetMultiplier and set that equal to 2 for example. I then would like to use the arithmetic widget to set the a profitGoalAmount variable which then could be added into a current position average price when creating a limit order to exit. Is there any reason why something like this would not work on strategy builder? Also what would be the best way to go about organizing the condition sets so that they are updating reliably? Cheers, thanks for any input! I am sure this will be the first of many discussions on here!
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy Builder Use of Updating Variables
Collapse
X
-
Strategy Builder Use of Updating Variables
I have some strategy ideas that involve storing values in variables, I have encountered the occasional logic bug that I cant figure out, and I am wondering if what I am trying to do is even possible on strategy builder. I am hoping to use strategy builder for all of this because I spend more time fighting syntax errors when coding than actually creating and testing strategies.
As an example of the type of operation I am trying to do, lets use an ATR based profit target as an example. I would like to update the value of ATR and store it in a variable at the end of every bar ATRval, then I will create an input that is called profitTargetMultiplier and set that equal to 2 for example. I then would like to use the arithmetic widget to set the a profitGoalAmount variable which then could be added into a current position average price when creating a limit order to exit. Is there any reason why something like this would not work on strategy builder? Also what would be the best way to go about organizing the condition sets so that they are updating reliably? Cheers, thanks for any input! I am sure this will be the first of many discussions on here! -
Hello BoneM4nwalkin,
Welcome to the NinjaTrader forums!
Saving the value of an indicator to a variable is possible. Doing math however, would require using a custom Series in the Strategy Builder or unlocking the script (for example you can use the offset to multiply by 2).
with regard to the attached image: Line A is an indicator Line B is the m period MAX of line A Line C is an average of this indicator A Line D is another average of this indicator A is it possible, possibly using the strategy builder, but without adding a temporary variable, to set on the condition: line C crosses below line D
The conditions are evaluated individually and in order. These should be organized in the order that each condition and action should be checked and triggered.Chelsea B.NinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
44 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
124 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
65 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|
Comment