Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

How to assign variables in strategy buider

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

    How to assign variables in strategy buider

    Hello,

    I know how to build a strategy where, fe, we have a TP and SL that user can select as an input variable.

    On the other hand, I would like to build a strategy based on RRratio, this means that the TP should be a multiple of SL by saying, an input variable, RRratio. So, the TP=SL*RRratio. How to implement this on strategy builder?

    Thanks

    #2
    Hello federicoo,
    Thanks for your post.

    It will not be possible to dynamically set the values of SetStopLoss and SetProfitTarget in the Strategy Builder. You would need to unlock your strategy and finish programming it manually.

    If you would like to do this completely in the Strategy Builder you could use the 'Exit' methods to exit the position. You would of course need to create your own conditions for your stop loss and target.
    Josh G.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Felix Reichert, 04-26-2024, 02:12 PM
    10 responses
    68 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by PaulMohn, 04-24-2024, 03:49 AM
    4 responses
    36 views
    0 likes
    Last Post PaulMohn  
    Started by lightsun47, Today, 11:37 AM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_Zachary  
    Started by vitaly_p, Yesterday, 05:09 PM
    4 responses
    35 views
    0 likes
    Last Post vitaly_p  
    Started by bortz, 11-06-2023, 08:04 AM
    50 responses
    1,777 views
    0 likes
    Last Post carnitron  
    Working...
    X