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

Strange StopLoss and ProfitTarget (Strategy Analyzer Results)

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

    Strange StopLoss and ProfitTarget (Strategy Analyzer Results)

    Dear CS,
    I developed my first strategy using Strategy builder wizard,
    and I set StopLoss: 30 pips, ProfitTarget: 150 pips,
    I run strategy analyzer with fixed quantity 10000 unit, from 2007 until 2017
    but the results seems strange, please see the screenshots, several trades hit stoploss larger than 30 pips, and also hit profittarget larger than 150 pips.Kindly see my screenshots

    Would you tell me why this happened?
    Attached Files

    #2
    Hello snowwhite85,

    Thanks for opening the thread.

    To get a better idea of why you received additional profit, I would suggest to view the chart for that trade. You can bring up a chart for the trade by right clicking on the trade and selecting Chart...

    It looks like your strategy is gaining extra profit over a weekend when there is not any market data.

    Attached is a chart for one trade that made $161.50 in profit.

    Please let me know if I may be of further help.
    Attached Files
    JimNinjaTrader Customer Service

    Comment


      #3
      Hi Jim,
      Yes, thank you, it's indeed the case, can you tell me where's the setting to exit trade at market close (in weekends) ? is it possible with strategy wizard?

      One additional question, where's the best resource to learn Ninjascript from scratch? are there any books dedicated to Ninjascript development?

      Comment


        #4
        Hello snowwhite85,

        Thanks for the additional questions.

        There is an order handling option for Exit On Session Close that can be set in the Strategy Analyzer or in the Edit Strategy window. This follows the Trading Hour template that you assign the primary data series to, and is not specific to weekends.

        You may add additional logic to control your positions based on the day of the week from the Strategy Builder. I have attached a rough example that will close open positions on Friday after 4:55PM.

        Many users report that a good first step before fully learning C# is to go through the NinjaTrader 7 NinjaScript tutorials in the help documentation to get a fundamental grasp on .NET framework and how it is used in NinjaScript. While for NinjaTrader 7, the concept behind NinjaScripts the same.

        You can view the tutorials for NinjaTrader 7 here: https://ninjatrader.com/support/help...?tutorials.htm

        Other users have wrote in about getting started with NinjaScript in our support forums here: http://ninjatrader.com/support/forum...d.php?p=488807

        Also available are webinars on the NinjaScript editor. I will link them below.

        Link to register for live webinar: http://ninjatrader.com/Webinar/NinjaScript-Editor-401

        Recorded webinar: https://www.youtube.com/watch?v=BA0W4ECyVdc

        Additional educational resources for NinjaScripts can be found here: http://ninjatrader.com/support/helpG..._resources.htm

        You may find additional 3rd party resources on Google, but this is the extent of the educational information I can provide.

        Please let me know if I can be of further help.
        Attached Files
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by algospoke, Yesterday, 06:40 PM
        2 responses
        19 views
        0 likes
        Last Post algospoke  
        Started by ghoul, Today, 06:02 PM
        3 responses
        14 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by jeronymite, 04-12-2024, 04:26 PM
        3 responses
        44 views
        0 likes
        Last Post jeronymite  
        Started by Barry Milan, Yesterday, 10:35 PM
        7 responses
        20 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by AttiM, 02-14-2024, 05:20 PM
        10 responses
        180 views
        0 likes
        Last Post jeronymite  
        Working...
        X