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

Is there a way to know which side I got the fill ?....

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

    Is there a way to know which side I got the fill ?....

    Hello Support,

    How can I know if after using EnterLong.... or EnterShort.... I was filled ???

    The methods return no value so I have no way to know if I got filled or not... is there a way to know?

    Assume I get a given signal and for that signal I might go long or short depending on the market (kind of a straddle)... once that happens I have found no way to know if I got filled long or short... and hence I am not able to manage my strategy correctly ... any ideas?

    Related to this there is another issue and that is since I dont know if I am long or short and after certain condition happen I would like to CLOSE my position so at this moment I am trying a Exitlong and Exitshort on the same condition but only the Exitlong get to work... Exitshort does not. (same behaviour as in one of my oldest threads).


    Thank you for your help
    GS

    #2
    Code:
    if(Position.MarketPosition==MarketPosition.Flat)
    {
          //do something
    }
    You can do MarketPosition.Flat or .Short or .Long
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      thank you for your help dear friend

      will try asap

      GS

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by tony_28217, Today, 07:04 PM
      0 responses
      3 views
      0 likes
      Last Post tony_28217  
      Started by flybuzz, Today, 10:33 AM
      1 response
      9 views
      0 likes
      Last Post flybuzz
      by flybuzz
       
      Started by spencerp92, 10-10-2023, 09:56 AM
      4 responses
      303 views
      0 likes
      Last Post flybuzz
      by flybuzz
       
      Started by samish18, Yesterday, 10:13 AM
      1 response
      25 views
      0 likes
      Last Post NinjaTrader_Eduardo  
      Started by Austiner87, Today, 05:02 PM
      0 responses
      6 views
      0 likes
      Last Post Austiner87  
      Working...
      X