Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Automated Strategy help needed

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

    Automated Strategy help needed

    I am interested in developing a basic strategy for backtesting with NinjaTrader but being new to the software I need some help. Firstly could the following strategy below be put together with the strategy wizard or would I need to use NinjaScript, if so how could I possibly go about it?

    To give you an idea, using the time frame x, I would like to enter a long trade when the current bid price is above the high of the previous bar and conversely enter a short trade when the current ask price is below the low of the previous bar. Other requirements include. That the trades in either direction are only allowed to be executed during a certain time frame in the morning and a certain time frame in the afternoon. Positions are allowed to be carried over into the no trade zone and managed accordingly but no new trades are to be executed. No positions is to be held past the trade session (if open) and must be closed within the last minutes. I want to exit the trade with a trailing stop X points below the low for a long position or above the high for a short position of the previous bar. You may be thinking that this is also an entry signal for a trade in the opposing direction (which it is), so a reversal trade may be opened in this instance if of course it meets the above requirements.

    I appreciate your feedback.
    Last edited by suprsnipes; 10-17-2008, 12:19 AM.

    #2
    Hello,

    If I understand you correctly, you should have all of this capability in the Wizard. However when you say this:

    "You may be thinking that this is also an entry signal for a trade in the opposing direction (which it is), "

    I want o clarify that you cannot be both long and short within the same market with true open positions going both long and short at the same time.
    DenNinjaTrader Customer Service

    Comment


      #3
      Thanks for the reply,

      "You may be thinking that this is also an entry signal for a trade in the opposing direction (which it is), "

      "I want to clarify that you cannot be both long and short within the same market with true open positions going both long and short at the same time".

      What I mean is that an exit for a position (based on the trailing stop method defined below) is also the entry for a new position in the opposite direction.

      After watching the video tutorial in Ninja Trader I have a better understanding of the wizard but the main problem I'm having is implementing the trailing stop based on the low of the previous bar for a long and the high of the previous bar for a short, which needs to be re-calculated at the close of each current bar, if the position is still open.

      Firstly I gather that this is not something you can do with the stop loss and trailing profit settings in the wizard and I'm actually supposed to set this up in the condition builder. Am I on the right track here?

      Thanks for your help.
      Last edited by suprsnipes; 10-17-2008, 03:20 PM.

      Comment


        #4
        suprsnipes,

        You are correct in that the trail stop and profit target orders will not work for you. In your case, the Condition Builder will not suffice either. You are going to need to custom program your logic that mimics a trailing stop and then submits an EnterShort() or EnterLong() order to reverse your position at the right moment.

        Unfortunately we cannot custom program this for you, but you can definitely try one of the 3rd party NinjaScript Consultants here: http://www.ninjatrader.com/webnew/pa...injaScript.htm

        Good luck.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by gentlebenthebear, Today, 01:30 AM
        0 responses
        2 views
        0 likes
        Last Post gentlebenthebear  
        Started by samish18, Yesterday, 08:31 AM
        2 responses
        9 views
        0 likes
        Last Post elirion
        by elirion
         
        Started by Mestor, 03-10-2023, 01:50 AM
        16 responses
        389 views
        0 likes
        Last Post z.franck  
        Started by rtwave, 04-12-2024, 09:30 AM
        4 responses
        31 views
        0 likes
        Last Post rtwave
        by rtwave
         
        Started by yertle, Yesterday, 08:38 AM
        7 responses
        30 views
        0 likes
        Last Post yertle
        by yertle
         
        Working...
        X