Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Enter / Exit at market price

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

    Enter / Exit at market price

    What would be the best command in an strategy to tell the program to either enter or exit the trading at the market price at the happening of an event . Eg SMA cross over .

    I will be pleased , if some one help me in this regard.


    Thank you in advance.

    Best Regards

    Simple

    #2
    Hello Simple,

    The simplest way of doing this would be to use the Managed Approach in NinjaScript.
    Here is a link to the documentation on this, It list all of the available methods you can use.



    For an entry or exit order at market you could simply do the following:

    Code:
    EnterLong();
    or

    Code:
    EnterShort();
    There are also other overloads for these that will allow you to specify quantities and signal names.

    If you have the time I would highly recommend watching our presentation on the usage of the Strategy Wizard as it explains more in detail of how the orders are processed in NinjaScript. While you may be writing your own code and not using the wizard, this video still applies the basics you use in NinjaScript.


    Please let me know if I may be of additional assistance.

    Comment


      #3
      Thank you very much. Both links are very informative and useful. I appreciate youe help.

      Have a nice week end.


      Simple

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      67 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      36 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      60 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      62 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Working...
      X