Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using Bid and Ask rather than Mark for stops

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

    Using Bid and Ask rather than Mark for stops

    In my former trading platform, I could set my stops so they would use
    bid/ask prices rather than the market price. This meant that the market
    had to hit the bid/ask price before being executed (bid price on
    buy orders and ask price on sell orders). Is there a way to do this using
    Ninja trader? Thanks.

    garry

    #2
    Hi Garry,

    Thank you for your post and welcome to the NinjaTrader support forum!

    Unfortunately, this is not possible. The last traded price will be used.

    I will, however, forward this on to my development team for further consideration.
    KyleNinjaTrader Customer Service

    Comment


      #3
      Hi Kyle,

      Thanks for the reply. I'm sorry to hear the bid/ask stop setting is not supported, but I appreciate your reply.

      Garry

      Comment


        #4
        Great suggestion.

        This would make NinjaTrader much more useful for me when trading Forex where the spread changes all the time, making it hard to figure into a canned ATM strategy.
        Last edited by KBJ; 12-11-2009, 01:53 PM.

        Comment


          #5
          This can be done in a custom strategy by using the OnMarketData function.

          Just check to see if the incoming tick is a Bid or Ask tick.


          Code:
          protected override void OnMarketData(MarketDataEventArgs iEvent)
          {
             if(iEvent.MarketDataType == MarketDataType.Bid)
             {
             ...
             }
             if(iEvent.MarketDataType == MarketDataType.Ask)
             {
             ...
             }
          }
          mrlogik
          NinjaTrader Ecosystem Vendor - Purelogik Trading

          Comment


            #6
            Originally posted by mrlogik View Post
            This can be done in a custom strategy by using the OnMarketData function.

            Just check to see if the incoming tick is a Bid or Ask tick.
            Thanks for the suggestion.

            In 6.5, I remember trying to use the methods OnOrderUpdate, OnPositionUpdate, OnExecution, and OnMarketData in a strategy with AtmStrategyCreate, and I found that I couldn't get the information I was trying to get. But maybe OnMarketData works with it, I just don't recall at this point.

            Does anyone know if OnMarketData works OK with strategies utilizing AtmStrategyCreate? Or are there limitations in this area?

            I don't want to switch from AtmStrategyCreate to EnterLongLimit & EnterShortLimit at this point because my understanding of 7.0 is that in this regard it's the same as 6.5 and this would cause my strategy to lose the functionality of being able to see and manually adjust the trades on the SuperDOM or by using the markers (or "visualizations" as they're called in the 6.5 help) from the chart trader on a non-strategy chart.

            So for now, I'll stick with the AtmStrategyCreate and politely ask NinjaTrader development for an early implementation of garry's request in post # 1 of this topic.

            Comment


              #7
              Hi KBJ,

              Good question. I don't have much experience with AtmStrategyCreate.

              Depending on your level of experience, you would create a .DLL C# Form that integrates within an NT strategy. From the form, you could pass controlling variables utilized in the OnMarketData() function within the strategy.

              However, this is an unsupported endeavor if you go that route.
              mrlogik
              NinjaTrader Ecosystem Vendor - Purelogik Trading

              Comment


                #8
                I've done some C# forms that operate external to NinjaTrader, and that could be done, but that's kind of an over-kill for what I'm trying to accomplish at this point.

                I re-checked my application and added an OnMarketDatamethod, and it seems to be getting called, so I'll put this back on my list of things to do and see if I can add this to my strategy.

                Nevertheless, I'd still like to see an option in the SuperDOM "Properties" screen which would specify that the bid or ask price be used when filling orders to close a position (i.e., profit and stop-loss targets) like Kyle said he would forward to Development... This would make NinjaTrader more competitive with other platforms which have this feature, as this is an important feature for trading instruments where significant bid-ask spreads can develop (like in Forex).

                Comment


                  #9
                  Hello Kyle,
                  I was about to write a similar question here in 2016, 7 years and a new beta version of ninjatrader after this original post. I was wondering if there was a way to set a stop and sell at market on ask vs bid and vice versa when short to set stop based upon bid vs ask. When I enter forex orders I keep in mind the current bid ask spreads and have to purposefully set stops outside the current spread. Hours later that spread may double or triple and someone goes gunning for stops and gets me. Even a simulated order doesn't seem to fix the issue as the simulated order is set to sell based on an Bid price for example in a long position and only helps if someone else doesn't place an actual bid price at or above my simulated stop. It seems that this is something very simple to program. compared to all the other capabilities ninjatrader has, and would avoid many whipsaw incidents

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Christopher_R, Today, 12:29 AM
                  0 responses
                  9 views
                  0 likes
                  Last Post Christopher_R  
                  Started by sidlercom80, 10-28-2023, 08:49 AM
                  166 responses
                  2,235 views
                  0 likes
                  Last Post sidlercom80  
                  Started by thread, Yesterday, 11:58 PM
                  0 responses
                  3 views
                  0 likes
                  Last Post thread
                  by thread
                   
                  Started by jclose, Yesterday, 09:37 PM
                  0 responses
                  8 views
                  0 likes
                  Last Post jclose
                  by jclose
                   
                  Started by WeyldFalcon, 08-07-2020, 06:13 AM
                  10 responses
                  1,415 views
                  0 likes
                  Last Post Traderontheroad  
                  Working...
                  X