Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT7 Forex trade orders

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

    NT7 Forex trade orders

    Hi,


    I do not know how to enter an order on the Forex with a Ninja script.
    Does anybody have any information or a basic Forex strategy to share?

    #2
    Hello Mumbly666,

    A NinjaScript Strategy can be run with any instrument. These are not different for forex than equities or futures.

    The strategies instrument will be the instrument of the chart or the instrument selected in the strategy parameters when adding to the Strategies tab of the Control Center.

    You will want to ensure the quantity is a valid quantity size.

    An example strategy included with NinjaTrader is the SampleMACrossOver.

    Below I am providing a link to a forum post with helpful information about getting started with NinjaScript.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Entry Order causes Exit

      Hi,
      I thank you for your previous reply which was helpful.
      Now, I have another problem.
      My NT7 Strategy is designed to trigger a second short order under certain conditions observed on a first short postion.
      The problem is that it looks like the strategy is automatically generating the exit of the first short position while entering the second one.
      I would like to have both position simultaneously opened.
      Any suggestions?

      Comment


        #4
        Hello Mumbly666,

        Unfortunately, this would not be possible.

        A brokerage account and a strategy position have only one position. You can be long or short a certain amount but you cannot be long and short or have multiple positions at the same time on the same account.

        You would also not be able to call a broker on a phone to do this.

        If you have multiple accounts, you can run a strategy on each account and have them take opposite positions on each account.

        Below is a link to a post that details.



        When calling an entry order in the opposite direction of a position, NinjaTrader will automatically close the open position first, and then enter into the opposite position.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thanks for your reply but I think we misundestood each other.
          I do not try to open a position in the opposite direction but I want to open a second position in the same direction, namely, a second short position.
          I understand that for obvious reasons, being short and long on the same account is impossible (with NT or else).
          The problem here is that the second short position opening closes automatically the first short position.

          Comment


            #6
            Hello Mumbly666,

            When you mention:
            "The problem here is that the second short position opening closes automatically the first short position."
            This is unlikely to be the case.

            More likely is that you have EntriesPerDirection set to 1 with EntryHandling as AllEntries and the second order is being ignored.

            When the second order is placed, are you seeing an exit order be submitted to exit the position and a new entry order fill in the output from the prints, or on the Orders tab of the Control Center?

            Try setting EntriesPerDirection to 2 in the strategy parameters.

            Below is a public link to the help guide on the strategy parameters.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Many thanks.
              I did not know that the default value for entriesperdirection was set to 1.
              I worked after setting it to 2.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Mizzouman1, Today, 07:35 AM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by Radano, 06-10-2021, 01:40 AM
              20 responses
              616 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by i019945nj, 12-14-2023, 06:41 AM
              6 responses
              67 views
              0 likes
              Last Post i019945nj  
              Started by aa731, Today, 02:54 AM
              1 response
              8 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by BarzTrading, Today, 07:25 AM
              0 responses
              3 views
              0 likes
              Last Post BarzTrading  
              Working...
              X