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 behavior -> ProfitTarget in Strategy?

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

    Strange behavior -> ProfitTarget in Strategy?

    Hello Fellows,

    I experienced a strange behavior in my current automated strategy.
    I attached a picture of my chart which shows the real time test on sim account.
    On the left/middle side of the chart you can see the historical trades. That looks good.
    But on the very right side (@20:00) you can see the real trades which happend when i turned the strategy on.
    It seems that the profit target got hit immediatelly after buying/selling...
    This is kind of strange, because in the backtest and in the historical trades of running strategy everything seems to be fine...


    Can somebody of you point me in the right direction? I'm kind of clueless here.

    Thanks!
    Attached Files
    Last edited by fernlicht; 02-15-2013, 07:39 AM.

    #2
    Hello fernlicht,

    Taking a look at your picture it looks like your Profit Target is being set to 0 right before 19:15.

    You may want to use Print() statements to verify values are what you expect and how your code is being prcocessed.


    Another helpful tools in strategies is TraceOrders, when set to true to your Initialize() method and you can then view valuable output related to strategy submitted orders through Tools > Output window.


    Let us know if we can be of further assistance.
    JCNinjaTrader Customer Service

    Comment


      #3
      Thanks, yes somehow it is 0;
      will implement TraceOrders in my code

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by haas88, 03-21-2024, 02:22 AM
      18 responses
      206 views
      0 likes
      Last Post haas88
      by haas88
       
      Started by Board game geek, Today, 02:20 AM
      0 responses
      1 view
      0 likes
      Last Post Board game geek  
      Started by knighty6508, Today, 01:20 AM
      2 responses
      12 views
      0 likes
      Last Post knighty6508  
      Started by franatas, Today, 01:53 AM
      0 responses
      2 views
      0 likes
      Last Post franatas  
      Started by knighty6508, Today, 01:17 AM
      0 responses
      9 views
      0 likes
      Last Post knighty6508  
      Working...
      X