• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Issues with SetProfitTarget

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

    Issues with SetProfitTarget

    I am running backtest with SetStopLoss and SetProfitTarget.

    The market never reaches the profittarget figure of 41.3
    however the backtest has fill at 41.4 as profit target despite this not being the profit target figure

    Below is copy of the trace orders for assistance
    Something is occurring at 10.58 but i cannot work out what - the orders are being cancelled or closed or expiring - i cannot figure it out why im getting execution with a profit target at 41.40

    9/11/2015 10:31:00 PM Entered internal PlaceOrder() method at 9/11/2015 10:31:00 PM: BarsInProgress=0 Action=SellShort OrderType=Stop Quantity=100 LimitPrice=0 StopPrice=41.81 SignalName='' FromEntrySignal=''
    9/11/2015 10:31:00 PM Entered internal SetStopTarget() method: Type=Target FromEntrySignal='' Mode=Ticks Value=0 Currency=41.3 Simulated=False
    9/11/2015 10:31:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Price Value=41.91 Currency=0 Simulated=False
    **NT** Stop/target handling for strategy 'ATH/878080d21fb84df2af88e0b69bebf1fb' set to 'ByStrategyPosition' since currency based target order was placed.
    9/11/2015 10:40:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Price Value=41.81 Currency=0 Simulated=False
    9/11/2015 10:40:00 PM Amended stop order: Order='NT-00001/Backtest' Name='Stop loss' State=Working Instrument='VVC' Action=BuyToCover Limit price=0 Stop price=41.81 Quantity=100 Strategy='ATH' Type=Stop Tif=Gtc Oco='NT-00000-6649' Filled=0 Fill price=0 Token='bb8cf10e461d475d9c5d68f66de7b37e' Gtd='1/12/2099 12:00:00 AM'
    9/11/2015 10:41:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Price Value=41.81 Currency=0 Simulated=False
    9/11/2015 10:42:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Price Value=41.81 Currency=0 Simulated=False
    9/11/2015 10:43:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Price Value=41.81 Currency=0 Simulated=False
    9/11/2015 10:44:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Price Value=41.81 Currency=0 Simulated=False
    9/11/2015 10:45:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Price Value=41.81 Currency=0 Simulated=False
    9/11/2015 10:46:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Price Value=41.81 Currency=0 Simulated=False
    9/11/2015 10:47:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Price Value=41.81 Currency=0 Simulated=False
    9/11/2015 10:48:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Price Value=41.81 Currency=0 Simulated=False
    9/11/2015 10:49:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Price Value=41.81 Currency=0 Simulated=False
    9/11/2015 10:50:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Price Value=41.81 Currency=0 Simulated=False
    9/11/2015 10:51:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Price Value=41.81 Currency=0 Simulated=False
    9/11/2015 10:52:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Price Value=41.81 Currency=0 Simulated=False
    9/11/2015 10:53:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Price Value=41.81 Currency=0 Simulated=False
    9/11/2015 10:54:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Price Value=41.81 Currency=0 Simulated=False
    9/11/2015 10:57:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Price Value=41.81 Currency=0 Simulated=False
    9/11/2015 10:58:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Price Value=41.81 Currency=0 Simulated=False
    9/11/2015 10:58:00 PM Cancelled pending exit order, since associated position is closed: Order='NT-00001/Backtest' Name='Stop loss' State=Working Instrument='VVC' Action=BuyToCover Limit price=0 Stop price=41.81 Quantity=100 Strategy='ATH' Type=Stop Tif=Gtc Oco='NT-00000-6649' Filled=0 Fill price=0 Token='bb8cf10e461d475d9c5d68f66de7b37e' Gtd='1/12/2099 12:00:00 AM'
    9/11/2015 10:58:00 PM Cancelled OCO paired order: BarsInProgress=0: Order='NT-00001/Backtest' Name='Stop loss' State=Cancelled Instrument='VVC' Action=BuyToCover Limit price=0 Stop price=41.81 Quantity=100 Strategy='ATH' Type=Stop Tif=Gtc Oco='NT-00000-6649' Filled=0 Fill price=0 Token='bb8cf10e461d475d9c5d68f66de7b37e' Gtd='1/12/2099 12:00:00 AM'
    9/11/2015 10:59:00 PM Cancelled expired order: BarsInProgress=0: Order='NT-00001/Backtest' Name='Stop loss' State=Cancelled Instrument='VVC' Action=BuyToCover Limit price=0 Stop price=41.81 Quantity=100 Strategy='ATH' Type=Stop Tif=Gtc Oco='NT-00000-6649' Filled=0 Fill price=0 Token='bb8cf10e461d475d9c5d68f66de7b37e' Gtd='1/12/2099 12:00:00 AM'

    #2
    Hello,

    Thank you for the question.

    I wanted to check, what chart type is this on and does the strategy use multiple time frames?

    Also have you tried reloading the historical data and then try another back test to see if the same occurs?

    I look forward to being of further assistance .
    JesseNinjaTrader Customer Service

    Comment


      #3
      Jesse ,
      this is on a 5min chart. there is only one time frame
      i tried reloading historical data but got the same result

      Comment


        #4
        Hello,

        Thank you for the reply.

        Does this occur in realtime and market replay as well or just backtest?

        This could potentially be a cache problem which you can test by clearing the cache.

        Please exit the platform and open the folder: Documents\NinjaTrader 7\db\cache and remove the contents of the folder.
        Now start back up and try the test once again. Do you get the same results?

        Also have you tried the Sample strategies to see if they are having similar results?

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by frankduc, Today, 11:14 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by Goolden, Today, 09:51 AM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by ArmKnuckle, Today, 01:25 AM
        1 response
        25 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by 7robert, Today, 08:26 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by 7robert, Today, 08:08 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Jim  
        Working...
        X