• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.
    http://ninjatrader.com/support/forum...678#post493678
    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.
        https://ninjatrader.com/support/foru...090#post513090


        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.
            https://ninjatrader.com/support/help...t_strategy.htm
            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 Andreas189, Today, 10:28 AM
              2 responses
              3 views
              0 likes
              Last Post Andreas189  
              Started by faisamtrader, Today, 09:30 AM
              2 responses
              9 views
              0 likes
              Last Post faisamtrader  
              Started by CDXTrader, Today, 12:29 AM
              1 response
              14 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by YevhenShynkarenko, Today, 08:14 AM
              0 responses
              3 views
              0 likes
              Last Post YevhenShynkarenko  
              Started by YevhenShynkarenko, Today, 07:14 AM
              1 response
              8 views
              0 likes
              Last Post NinjaTrader_Jim  
              Working...
              X