Announcement

Collapse
No announcement yet.

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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      639 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      366 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      107 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      569 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      572 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X