Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Need to have one strategy start another strategy

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

    Need to have one strategy start another strategy

    HI,
    I need to do something like the following:
    When my strategy A starts, it immediately enters a LONG position.
    Once the LONG position is entered, the price is retrieved for the LONG position and then this strategy A loads strategy B which gets passed the fill price of the LONG position.
    Strategy B then opens a SHORT position based upon the price of the LONG position. It may then load stratgy C, passing the filled price of the SHORT position.

    Can someone tell me, how do I pass the entry prices between strategies,
    how do I kick-off a strategy from within another strategy, and if it is possible to close a strategy form within another strategy?

    Sorry for dumb questions. I am a newbie!

    #2
    >> how do I kick-off a strategy from within another strategy, and if it is possible to close a strategy form within another strategy?
    Not possible. However, you could try to code your logic in one strategy instead of two.

    Note:
    - a strategy may have multiple entries/exits over time. A strategy is not (!) terminated after the first trade is closed.
    - you may even "tag" entries and have multiple entries active the same time. Please check out the tutorials: http://www.ninjatrader-support.com/H...verview39.html
    DierkNinjaTrader Customer Service

    Comment


      #3
      The problem I am trying to solve is that I want to have long and short positions in the same instrument simultaneously. The only way to do this is to have separate strategies for each request so that one does not cancel the other.

      But, I absolutely need this event-driven, so that the second strategy only submits it's order once the first one is filled.

      I jsut figured out how to do this. I will have to use static var's that all strategies can access. I will start up all strategies at the beginning.
      then when strategy A gets it's order filled, it sets a flag that stratgy B can poll for. At this point, strategy B can submit it
      s order.

      Does this sound like the only way I can do this??

      Comment


        #4
        I see.

        >> I will have to use static var's that all strategies can access
        Yes, you could try that.
        DierkNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by soon123, Today, 12:51 AM
        0 responses
        1 view
        0 likes
        Last Post soon123
        by soon123
         
        Started by Jema1, Today, 12:23 AM
        0 responses
        3 views
        0 likes
        Last Post Jema1
        by Jema1
         
        Started by soon123, Yesterday, 11:14 PM
        0 responses
        1 view
        0 likes
        Last Post soon123
        by soon123
         
        Started by smcllr, Yesterday, 04:15 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_ShawnB  
        Started by rtwave, Yesterday, 02:33 PM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_Kate  
        Working...
        X