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

Create stop order reference to Position Average Price

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

    #31
    Hello DTSSTS,

    From the output I am seeing:

    1/31/2019 10:48:25 AM Strategy '/154496965': Entered internal SubmitOrderManaged() method at 1/31/2019 10:48:25 AM: BarsInProgress=0 Action=Sell OrderType=StopMarket Quantity=100 LimitPrice=0 StopPrice=270.06 SignalName='BreakEvenLongBounceVL' FromEntrySignal='LongBounceVL'

    1/31/2019 10:48:25 AM Strategy '/154496965': Entered internal SubmitOrderManaged() method at 1/31/2019 10:48:25 AM: BarsInProgress=0 Action=Sell OrderType=StopMarket Quantity=100 LimitPrice=0 StopPrice=270.06 SignalName='BreakEvenLongBounceVLST' FromEntrySignal='LongBounceVLST'

    1/31/2019 10:48:25 AM PositionLongBounce: True = true & MarketPosition: Long = Long & Close[0]: 270.36 > (AveragePrice + (45 * TickSize)): 270.56 & BreakEvenLongBounce: True = true

    I'm not sure what was suppose to happen, but the condition should not have evaluated as true. I see some stop market orders were placed, but they should not have come from this condition set.

    270.36 is not greater than 270.56

    Perhaps try a shorter distance for the offset?


    With the BreakEvenLongBounceVL and BreakEvenLongBounceVLST orders that were working, there were sell stop markets at 270.06. I'm not certain what the low of that bar is, but the close price is much greater than that so these stop market orders would not have filled.
    Last edited by NinjaTrader_ChelseaB; 02-19-2019, 08:42 AM.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #32
      • With the BreakEvenLongBounceVL and BreakEvenLongBounceVLST orders that were working, there were sell stop markets at 270.06. I'm not certain what the low of that bar is, but the close price is much greater than that so these stop market orders would not have filled.
      these should have filled where the arrow is drawn on the chart

      Comment


        #33
        Hello DTSSTS,

        To confirm, the issue you are inquiring about has nothing to do with the condition set that we have been analyzing?


        Ok, so you want to know why the BreakEvenLongBounceVL did not fill at 10:48:25 on 1/31?

        This was a sell stop market order at 270.06 and appears to resubmitted on each new bar to keep it alive so it should be in a working state.

        What is the high and low of the 10:48:25 bar?
        Last edited by NinjaTrader_ChelseaB; 02-19-2019, 11:12 AM.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #34
          high 270.60 low and close 270.35

          Comment


            #35
            Hello DTSSTS,

            With the order working at 270.06 this order was not between the high and low of the bar with the low at 270.35.

            This order would not have filled as there was not a valid fill price for this order.

            1/31/2019 10:48:25 AM Strategy '/154496965': Entered internal SubmitOrderManaged() method at 1/31/2019 10:48:25 AM: BarsInProgress=0 Action=Sell OrderType=StopMarket Quantity=100 LimitPrice=0 StopPrice=270.06 SignalName='BreakEvenLongBounceVL' FromEntrySignal='LongBounceVL'

            Chelsea B.NinjaTrader Customer Service

            Comment


              #36
              it should have filled at 10:52:04
              bar high 270.22 and bar low 269.97

              Comment


                #37
                Hello DTSSTS,

                There are no prints in the output for a bar close on 1/31/2019 at 10:52:04.

                There is a bar close at 10:48:25, 10:49:32, and 10:58:10. Are you sure you are looking at the same output file you have provided in post #33?

                Since we are no longer concerned with the condition we were previously analyzing and you would like to analyze this order instead, please print the high and low of the bar and include the output with your next post so that we can confirm this.
                Last edited by NinjaTrader_ChelseaB; 02-19-2019, 11:45 AM.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #38
                  i give up, i quit

                  Comment


                    #39
                    Hello DTSSTS,

                    You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #40
                      great video to create these orders

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by helpwanted, Today, 03:06 AM
                      1 response
                      7 views
                      0 likes
                      Last Post sarafuenonly123  
                      Started by Brevo, Today, 01:45 AM
                      0 responses
                      7 views
                      0 likes
                      Last Post Brevo
                      by Brevo
                       
                      Started by aussugardefender, Today, 01:07 AM
                      0 responses
                      5 views
                      0 likes
                      Last Post aussugardefender  
                      Started by pvincent, 06-23-2022, 12:53 PM
                      14 responses
                      242 views
                      0 likes
                      Last Post Nyman
                      by Nyman
                       
                      Started by TraderG23, 12-08-2023, 07:56 AM
                      9 responses
                      384 views
                      1 like
                      Last Post Gavini
                      by Gavini
                       
                      Working...
                      X