Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy testing results

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

    Strategy testing results

    Hey guys, I've got a fairly complicated strategy im testing at the moment. It's not using ProfitTargets or StopLoss I've programmed all the entrys and exits and amount and times it closes etc into the code.

    I'm getting some weird results though and though I'd ask if anyone has done / seen anything like this.

    it's still running at the moment I'm using replay data to test this one, in the control center the strategy is green and the realized amount is -$26,000

    Yeh when I right click and go Strategy Performance > Historical & Realtime it says it made $11,000 profit.

    What would cause this strange difference?

    #2
    Let me add, the reason I am not using StopLoss or ProfitTarget is because I can't seem to control the amount it StopLosses.

    So for example, I buy 1000L of something, and I set the stop loss to 20 ticks lower then my entry price, when it hits 20 ticks higher it sells 300 and enters another 600 under a different order, then relocate the stoploss to +10 from my entry price of the first entry.

    Now if the stoploss triggers it sells 1000L, when I actually only have 700 of them left because I already sold 300.

    Same applies to PT, it seems to sell the full amount of the entry price....I can't find a way to control or use the remaining amount, maybe if someone can shed some light on that I can use them instead it would certainly simplify my code.

    Comment


      #3
      I found an old thread that explained the stoploss problem in detail.
      EnterLong(2,"A")
      ExitLong(1,"A")
      StopLoss("A") - this sells the same amount as entry, so 2 and actually causes a 1 reversal.

      Same applies to ProfitTarget, so, thats fine I have got around this in my code. It still doesn't explain the weird results I'm seeing...

      Comment


        #4
        happypappy, sorry for our late follow up here. What you were running into likely in the managed mode the need to scale in first so you would be able to explicitly scale out later in your operations - http://www.ninjatrader.com/support/f...ead.php?t=3751

        To be working without any order handling rules and enjoy ultimate flexibility the unmanaged mode was added to NT7 - http://www.ninjatrader.com/support/h...d_approach.htm

        The strategy realized would be what you have seen executing in realtime / replay, it would not include historical (backtest) results though.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Really appreciate that information, Ill get cracking, I've got a series of different strategy's running now that are doing ok, Ill be combining them shortly into a master strategy! The scaling will get even more complicated with the current system because I'd have to account for so many different entries, so hopefully the forum / code you sent me simplifies my code.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by tkaboris, Today, 08:01 AM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by Lumbeezl, 01-11-2022, 06:50 PM
          31 responses
          817 views
          1 like
          Last Post NinjaTrader_Adrian  
          Started by xiinteractive, 04-09-2024, 08:08 AM
          5 responses
          15 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by swestendorf, Today, 11:14 AM
          2 responses
          6 views
          0 likes
          Last Post NinjaTrader_Kimberly  
          Started by Mupulen, Today, 11:26 AM
          0 responses
          7 views
          0 likes
          Last Post Mupulen
          by Mupulen
           
          Working...
          X