Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Builder Use of Updating Variables

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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!

    #2
    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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by AHamxa, Today, 11:17 PM
    0 responses
    2 views
    0 likes
    Last Post AHamxa
    by AHamxa
     
    Started by Spiderbird, 07-27-2018, 07:52 PM
    12 responses
    9,240 views
    2 likes
    Last Post Mountain_cast  
    Started by chrischongpdx, Today, 09:39 PM
    0 responses
    7 views
    0 likes
    Last Post chrischongpdx  
    Started by Mountain_cast, Today, 12:41 PM
    2 responses
    10 views
    0 likes
    Last Post Mountain_cast  
    Started by dontpanic, 04-07-2015, 04:42 AM
    4 responses
    1,322 views
    0 likes
    Last Post BeachTrader11807  
    Working...
    X