• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EnterLongStopLimit

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

    EnterLongStopLimit

    Greetings,

    I want to make sure one thing:
    If an EnterLongStopLimit() is executed in my strategy, the order will NOT be entered "right away", right!?
    It will only enter when the limit price is hit, right!?
    And if the "Stop Price" is hit, the order will be canceled EVEN IF the order is NEVER entered!?

    Thank you very much for your help!

    #2
    Hello YoutingChu,

    Thank you for the note.

    A buy stop limit order is a type of order that can be placed above the market price. It will only be executed if the market reaches the limit price or better, up to the stop price. The order would not automatically cancel itself. To cancel an order, you would need to use CancelOrder().

    Please let me know if I can assist further.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Dear Chris,

      Thank you very much for your help!
      I have to admit that all these Enter stuff confused the crap out of me! >3<
      So I guess it will be easier if I just tell you what I'm trying to do.

      Take a long position as an example,
      If the current price is 100, I would like to place a long order if it hit 110, with both StopLoss and ProfitTarget of 10.
      And cancel the order if it hit 90.

      Thank you very much for your help!

      Comment


        #4
        Hello YoutingChu,

        Thanks for the post.

        If you would like to monitor the price and enter the market yourself, I would recommend using an ATM Strategy. In Chart Trader, you can select an ATM strategy to use then place an order at your desired price. When the order is filled, an OCO stop and target will be created automatically.

        Below I have also included a public link to our YouTube video on using ATM's:

        https://www.youtube.com/watch?v=Gnyx8RSp3EI&t=824s

        To implement a strategy around this, I recommend defining entry and exit conditions for your strategy first. The SampleMACrossover strategy is a good introductory strategy that flip-flops between long and short based on two SMAs crossing each other.

        I have attached a simple strategy that utilizes SetStopLoss and SetProfitTarget to set up protective orders for entries made by the strategy. The entry condition was made up just for the example, a simple check if the CLose price crosses above the EMA.

        You may import the .zip file by going to Tools>Import>NinjaScript Addon. Say "No" to replacing the @EMA.cs file.

        Please let me know if I can assist further.
        Attached Files
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by thgamey, Today, 08:38 PM
        0 responses
        2 views
        0 likes
        Last Post thgamey
        by thgamey
         
        Started by johnnybegoode, Today, 07:02 PM
        0 responses
        4 views
        0 likes
        Last Post johnnybegoode  
        Started by YevhenShynkarenko, Today, 05:02 PM
        1 response
        11 views
        0 likes
        Last Post YevhenShynkarenko  
        Started by lahabatha, Today, 04:42 PM
        0 responses
        12 views
        0 likes
        Last Post lahabatha  
        Started by explorer101, Today, 03:39 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X