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

Problem Getting Strategy To Run for Pairs Trading

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

    Problem Getting Strategy To Run for Pairs Trading

    Hi,

    I have an indicator that prepares several plots that are independent of the chart instruments.

    The chart has two instruments and the indicator performs various calculations based on the difference between the pair of instruments, and various ratios.

    The strategy is looking at crosses between some of the calculated charts, and has little to do with the original instruments. On the cross I want to buy one instrument and sell the other instrument.

    I started off by trying to setup an order initiated by the cross, but I don't get anything. An order is never initiated.

    Is it possible to create a strategy to do some back testing for this type of indicator?

    Thanks

    Ian

    #2
    Hello IanC28,

    Thanks for your post.

    Yes, you should be able to backtest using either the strategy analyzer or Playback (with market replay data).

    Please make sure you have reviewed the helpguides section on multi series/time frames to understand the references needed for placing orders in that environ: http://ninjatrader.com/support/helpG...nstruments.htm

    If you haven't already you can begin debugging to see what is happening in your code sections where you are placing your entry orders. Are your entry conditions being met but the orders are not filled? If you are using the managed approach keep in mind that orders placed but not filled are automatically canceled on the next bar. Reference: http://ninjatrader.com/support/helpG...d_approach.htm

    In case you have not reviewed, here is a reference to the debugging process: http://ninjatrader.com/support/forum...ead.php?t=3418
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by usazencort, Today, 01:16 AM
    0 responses
    1 view
    0 likes
    Last Post usazencort  
    Started by kaywai, 09-01-2023, 08:44 PM
    5 responses
    603 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by xiinteractive, 04-09-2024, 08:08 AM
    6 responses
    22 views
    0 likes
    Last Post xiinteractive  
    Started by Pattontje, Yesterday, 02:10 PM
    2 responses
    21 views
    0 likes
    Last Post Pattontje  
    Started by flybuzz, 04-21-2024, 04:07 PM
    17 responses
    230 views
    0 likes
    Last Post TradingLoss  
    Working...
    X