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

setting profit margin/loss per day

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

    setting profit margin/loss per day

    can you tell me how do i set a max profit or loss margin on a strategy for daily basis.
    also can you let me know how to set two different time periods for a strategy to trade ie 5-7 and 12-2
    thank you

    #2
    green,

    Please see this reference sample for max profit/loss: http://www.ninjatrader-support2.com/...ead.php?t=4084

    Please see this reference sample for time filters: http://www.ninjatrader-support2.com/...ead.php?t=3226

    If you want two time filters, just create two ranges.

    Code:
    if ((ToTime(Time[0]) > 50000 && ToTime(Time[0]) < 70000) || (ToTime(Time[0]) > 120000 && ToTime(Time[0]) < 140000))
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Uregon, Today, 03:44 AM
    0 responses
    2 views
    0 likes
    Last Post Uregon
    by Uregon
     
    Started by CyberNate, 11-17-2020, 08:15 PM
    2 responses
    426 views
    0 likes
    Last Post nurpalgo  
    Started by sdauteuil, 09-23-2021, 10:16 AM
    7 responses
    1,247 views
    0 likes
    Last Post marcus2300  
    Started by sofortune, 05-18-2024, 11:48 AM
    2 responses
    34 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by Zach55, 02-19-2024, 07:22 PM
    2 responses
    67 views
    0 likes
    Last Post lbadisa1  
    Working...
    X