Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

How to submit limit order below or above current market

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

    How to submit limit order below or above current market

    Easy one but can't figure it out - how do I submit a limit order at a price X points above or below the current price once the indicator has been met?

    #2
    Hello FutTrader9000,

    Thanks for your post and welcome to the NinjaTrader forums!

    You've posted in the NinjaTrader8 Strategy forum, can you clarify if you are working with the Strategy Builder, or are you working directly with Ninjascript?

    It may be helpful for you to provide an example of what you have tried and what is not working as you expect.

    What calculate setting is the strategy running with? (Calculate.OnBarClose, Calculate.OnPriceChange, or Calculate.OnEachTick).

    How are you testing? In the strategy analyzer, in Playback with Market replay data, or live data with the sim101 account?

    What instrument type are you testing with? (Futures, forex, equities)?

    What bar type and bar size are you using? (example: 5 minute, 10 range, 4 renko, etc.)


    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hi Paul - working purely within the strategy builder and analyzer. Looking at stochastic signals using either on bar close or on each tick using relatively small volume bars in S&P futs. Basically the goal is once we hit an oversold or overbought signal as calculated by the stochastics, I don't want to submit a market order - I want to submit a limit order that is still further away from the current level.

      So say we're selling off and futs hit 4625 and that triggers a 'buy' signal - I want this strategy to actually submit a limit order to buy at 4615, for example.
      Last edited by FutTrader9000; 12-02-2021, 12:16 PM.

      Comment


        #4
        Hello FutTrader9000,

        Thanks for your reply.

        I'll point you to an example I created in another thread. The example strategy builder strategy demonstrates using an EnterLongStopMarket() order 2 ticks above the high of bar as the entry order. then when filled and the position is long, a profit target (using ExitLongLimit) is placed above the entry price + 4 ticks and an exitLongStopMarket is used as the stop order at the low of a previous bar -1 tick.

        Link: https://ninjatrader.com/support/foru...on#post1174873

        Some important points to understand:
        1) When using exit methods that are not a market order, you cannot also use the Set methods (SetStopLoss, SetProfitTaregt, etc. etc.). The limit/stop type orders would be ignored.
        2) The educational example is only one direction, long, it is provided to give you something to review/test.
        3) When submitting limit/stop type orders, the orders are automatically canceled if not filled in the bar they are submitted. The example shows how to maintain the order (resubmit the order on each bar)

        In case you have not seen the other educational materials on the strategy builder:
        Free live webinar every other Thursday at 4:00 PM EST, through this link to all webinars: https://ninjatrader.com/PlatformTraining
        Previous recording of the Strategy Builder 301 webinar: https://youtu.be/HCyt90GAs9k?list=PL...auWXkWe0Nf&t=2
        Help guide for the strategy builder: https://ninjatrader.com/support/help...gy_builder.htm
        Tutorial using the Strategy Builder (Titled "Creating the Strategy by the Wizard): https://ninjatrader.com/support/help..._cross_ove.htm
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          FutTrader9000 Not sure if you're after a technical resolution or an explanation. Since NinjaTrader_PaulH has provided a (mainly) technical answer, here's a simple explanatory addition ... and if you already know all this, well done -- hopefully, it will be useful for other readers.

          A simple explanation of four basic Order types:
          • BUY LIMIT is a Buy Order where the desired ENTRY price is BELOW the Current Ask price. Ask price must move DOWN to the Entry price for the order to execute as a Market Order.
          • BUY STOP is a Buy Order where the desired ENTRY price is ABOVE the Current Ask price. Ask price must move UP to the Entry price for the order to execute as a Market Order.
          • SELL LIMIT is a Sell Order where the desired ENTRY price is ABOVE the Current Bid price. Bid price must move UP to the Entry price for the order to execute as a Market Order.
          • SELL STOP is a Sell Order where the desired ENTRY price is BELOW the Current Bid price. Bid price must move DOWN to the Entry price for the order to execute as a Market Order.
          It is important to understand how Limit and Stop Orders work when the price they are placed at is reached, but the placement is clear. Hope that is helpful.

          Thanks.
          Multi-Dimensional Managed Trading
          jeronymite
          NinjaTrader Ecosystem Vendor - Mizpah Software

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by inanazsocial, Today, 01:15 AM
          0 responses
          2 views
          0 likes
          Last Post inanazsocial  
          Started by trilliantrader, 04-18-2024, 08:16 AM
          5 responses
          22 views
          0 likes
          Last Post trilliantrader  
          Started by Davidtowleii, Today, 12:15 AM
          0 responses
          3 views
          0 likes
          Last Post Davidtowleii  
          Started by guillembm, Yesterday, 11:25 AM
          2 responses
          9 views
          0 likes
          Last Post guillembm  
          Started by junkone, 04-21-2024, 07:17 AM
          9 responses
          70 views
          0 likes
          Last Post jeronymite  
          Working...
          X