Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

several probs with auto custom script strategies

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

    several probs with auto custom script strategies

    Hi,
    I have a self coded strategy and I am experiencing several problems while executing in real time.

    * My positions exit twice. For a short position, when I call exit, there is a close position fill and a buy to cover fill. I end up with one long position in the end. Same scenario happens with long orders.
    I am using EnterLong(), EnterShort and ExitShort(), ExitLong(). To give an example, consider this actual event. I am short 1 GBPUSD. It exits twice and then my strategy goes long at the same time. So instead of 1 long, now I am 2 long. Real fun begins now. Strategy exits long positions and I am 2 short, just because it closed twice, and then my strategy goes short. I am 3 short. So the strategy that started with 1 position max in each direction has me with 3 short positions somehow!! thankfully I am still testing on sim account.

    * I start strategy from strategy tab. When I stop a strategy by clicking stop button, it cancels stop and limit orders but any open positions are not closed.
    Then I close the positions manually. Next time I start strategy, the previous open position shows up. e.g. if I am long GBPUSD, I stop strategy, it cancels stop and limit orders. Long GBPUSD is left untouched. I close manually. Next time I start strategy on same instrument, it shows 1 long GBPUSD. There is no actual open position and it's not there in positions tab. There is no way to close this position and there are no stop/limit orders for this ghost position.
    I have "cancel strategy orders on strategy termination" checked in the options menu.

    * Sometimes when I start a strategy, I get "DB ....object not being tracked" error. the strategy starts anyway.

    I am using version 6.0 and Gain capital data feed for forex.

    I hope these issues are resolved quickly so I can atleast begin testing my strategies correctly real time and feel confident enough to go live.

    Thanks,
    K
    Last edited by kausti; 05-14-2007, 05:24 PM.

    #2
    K,

    Three separate issues here.

    1) Is this reproducible each time you run a strategy? If yes, I would want to reproduce this on our test machines.

    2) This is correct behaviour. A strategy position is NOT automatically synchronized to your account position. When you start a strategy, it historically calculates the current position of the strategy (virtual position), should you wish to synchronize your account position, you would have to manually enter an order so they match up.

    3) This issue is hopefully resolved with our next update.
    RayNinjaTrader Customer Service

    Comment


      #3
      Hi,
      Thanks for reply.

      The first issue is reproducible "most" times I run strategy. It happens about 70-80 % times. I don't know how to reproduce it but could send you my logs so you can confirm the behavior.

      You say,
      "A strategy position is NOT automatically synchronized to your account position. When you start a strategy, it historically calculates the current position of the strategy (virtual position), should you wish to synchronize your account position, you would have to manually enter an order so they match up."

      I don't get this. So if my strategy has an open position, and I need to terminate strategy, how am I supposed to do it. The documentation clearly says not to manually close strategy position and and in case you have to, terminate the strategy itself. Please clarify.

      Thanks,
      Kausti

      Comment


        #4
        Please run your strategy, next time this happens, mark the time and send me an email to ray at ninjatrader dot com via Help > Mail to Support within the Control Center window.

        Why would you need to terminate your strategy if it has a starting position? Here are your options:

        1) Manually place an order in the Control Center Orders tab into the account the strategy is running on in order to "sync" your account position to the strategy position.

        2) Set the option "Wait until flat before executing live" http://www.ninjatrader-support.com/H...tegiesTab.html
        RayNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Perr0Grande, Today, 08:16 PM
        0 responses
        2 views
        0 likes
        Last Post Perr0Grande  
        Started by elderan, Today, 08:03 PM
        0 responses
        5 views
        0 likes
        Last Post elderan
        by elderan
         
        Started by algospoke, Today, 06:40 PM
        0 responses
        10 views
        0 likes
        Last Post algospoke  
        Started by maybeimnotrader, Today, 05:46 PM
        0 responses
        11 views
        0 likes
        Last Post maybeimnotrader  
        Started by quantismo, Today, 05:13 PM
        0 responses
        7 views
        0 likes
        Last Post quantismo  
        Working...
        X