Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ninjascript stops

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

    Ninjascript stops

    I would like to set a safety stop along with each order in my automated trading strategy in case I loose a connection or NT shuts down unexpectedly.
    (trading in forex)

    In the Strategy Wizard there are Exit by Stops and Stop Limit orders. Could you explain the logic differences in the two?

    I would like to have a $ amount stop loss set for each position based on Actual position p&l and not strategy position p/l that is sent to the broker (MB in my case) and thereby residing in their servers in case of a problem.

    Can this be accomplished in the wizard?

    Thanks.
    Last edited by billr; 04-23-2010, 12:37 PM.

    #2
    Hi billr,

    Thank you for your post.

    You can also just set a Stop Loss using the wizard, in the last step.
    More info on the syntax of SetStopLoss() at - http://www.ninjatrader-support.com/H...ml?SetStopLoss

    Stop Order
    An order to buy or sell a security when its price surpasses a particular point, thus ensuring a greater probability of achieving a predetermined entry or exit price.

    Stop-Limit Order
    An order placed with a broker that combines the features of stop order with those of a limit order. A stop-limit order will be executed at a specified price (or better) after a given stop price has been reached. Once the stop price is reached, the stop-limit order becomes a limit order to buy (or sell) at the limit price or better.

    By default, orders are kept alive provided that they are re-submitted on each call of the OnBarUpdate() method. If the order is not re-submitted, the order is then cancelled. If the order is re-submitted with changed parameters (new limit price for example) the order is modified.

    For more information, please see - http://www.ninjatrader-support.com/H...tml?Overview36

    In the "Order Submission for Entry and Exit Methods - Basic Operation" section.
    TimNinjaTrader Customer Service

    Comment


      #3
      Thanks Tim.

      I assume then, using the SetStopLoss in the wizard would send a live Stop order to the broker based on a set amount. So that stop amount is at the broker and is based on the actual p/l as per broker's actual trade data.

      Example: If I SetStopLoss to $100 using the wizard. At each new position entry (long to short etc.) as per strategy, there will be a corresponding live stop set in place with the broker. if there is a connection lost or NT problem, the stop will trigger if and when the last position hits the $100 loss level. Is this correct?


      Also, I am using NT7 if that makes a difference.

      Comment


        #4
        Hi billr,

        This depends on which Stop Loss you are using...

        If you use "Stop loss total position (cash)" this will total loss of the strategy position allowed until you are stopped out of the position.

        Otherwise, if you use "Stop loss" will be based on the position entry price (unless using .Price mode)
        TimNinjaTrader Customer Service

        Comment


          #5
          In either case, will this stop reside at the broker in case of system failure?

          If so, can the Stop Loss Total Position distinguish each Strategy Position if you are running multiple strategies, after loss of connection? Or would it default to the total open trades against the account balance (total cash position).

          I am less concerned with the equity curve or total account position loss from mounting losses than I am about catching a rogue trade in this instance. Therefore I am inclined to think that the Stop Loss would be the 'cleanest' approach to making sure a runaway trade is limited to a certain amount of damage. With emphasis on the event of a connection loss.

          Am I making sense?

          Comment


            #6
            Hello,

            Please review this link and let me know if you have any more questions:
            Note: This information is relevant for NinjaTrader 7 only. For NinjaTrader 8, please click here (https://ninjatrader.com/support/helpGuides/nt8/where_do_your_orders_reside_.htm). CQG Orders in a state "Accepted" or "Working" are at the exchange. If the exchange does not support a specific order type, the
            DenNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ScottWalsh, Today, 06:52 PM
            4 responses
            32 views
            0 likes
            Last Post ScottWalsh  
            Started by olisav57, Today, 07:39 PM
            0 responses
            4 views
            0 likes
            Last Post olisav57  
            Started by trilliantrader, Today, 03:01 PM
            2 responses
            19 views
            0 likes
            Last Post helpwanted  
            Started by cre8able, Today, 07:24 PM
            0 responses
            6 views
            0 likes
            Last Post cre8able  
            Started by Haiasi, Today, 06:53 PM
            1 response
            4 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Working...
            X