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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      630 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      364 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      105 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      565 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      568 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X