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

Strategy Builder - configure a profit target condition?

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

    Strategy Builder - configure a profit target condition?

    Does anyone know how I could run an automated strategy until profit hits $50.00 (total PnL?)? But stop running if we go negative $50.00?
    Last edited by MatthewLesko; 03-09-2021, 12:52 AM.

    #2
    Hello MatthewLesko,

    Thank you for your post.

    Yes, in the Strategy Builder you could create a set of conditions to check whether your realized PnL is greater or less than your values, and set a bool to control whether the strategy can enter again. I've created a simple strategy builder strategy that runs in real time only (please test with the Sim101 account on a live chart) and submits a long order with a stop and target if the current position is flat and a bool called OKtoTrade is true. When the strategy sees that the realized PnL is greater or less than the ProfitPnL or LossPnL, the bool is changed to false and the strategy will not enter further trades.

    Please let us know if we may be of further assistance to you.
    Attached Files
    Kate W.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by trimpy, Today, 04:38 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by dpolyakov, 03-29-2024, 11:30 AM
    4 responses
    150 views
    2 likes
    Last Post NinjaTrader_RyanS  
    Started by traderqz, Today, 12:06 AM
    1 response
    2 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by kujista, Today, 06:23 AM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Pattontje, Yesterday, 02:10 PM
    2 responses
    34 views
    0 likes
    Last Post Pattontje  
    Working...
    X