Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Forex.com programmer here with a getting started question

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

    Forex.com programmer here with a getting started question

    I already have a forex.com account and have been trading forex for a few months. I use a signal service that sends me emails of signals and I have a program to read the emails. The data they provide is the pair, if it's buy/sell, at what enter rate, and a stop/limit for the trade. I would then run my own code each day to figure out what pairs to trade based on my own strat and when I get those signals make the trades. It seems like I would be able to make those trades using ninja trader?

    I'm working with forex.com to get my ninja trader account setup with them, but as far as the api goes with making these kind of If Then OCO trades, I was hoping someone could point me in the right direction.

    #2
    Hello,

    Thank you for your forum post.

    To clarify your asking on how you would go about coding NinjaTrader to submit OCO orders based on conditions? Are you wanting OCO for your profit target or stop loss or for your entry orders or both?



    I look forward to assisting you further.
    BrettNinjaTrader Product Management

    Comment


      #3
      To clarify your asking on how you would go about coding NinjaTrader to submit OCO orders based on conditions?
      Correct, but those conditions are not based on rates. They are outside conditions to the market data itself. I get signals emailed to me, and I want to place orders based on those emails. I already have the coding to pull the emails automatically out so I have them to work with. So maybe I can use the scripting with Ninja Trader to read these from a file or database, and have the Ninja Trader scripting enter the deals based on that?

      Are you wanting OCO for your profit target or stop loss or for your entry orders or both?
      I want an If Then OCO. If the buy/sell rates hits x, get into the deal with y stop loss and z limit.

      Comment


        #4
        You may be interested in Advanced Trade Management. This allows you to apply target and stop losses to orders that are automatically applied upon entry execution. These orders are OCO with no additional configuration needed.

        See here for more information on Advanced Trade Management.

        This is for discretionary entries and automatic exits.

        If you want to fully automate your system, see here for the reference sample on reading from a file with NinjaScript:
        Using StreamReader to read from a text file
        Using System.IO File properties to write to and read from a text file
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Cool, I'll take a look at reading a file.

          Is there any other way to get external data into Ninja script? Maybe I could call a Ninja script function passing in some information from an outside source? The file thing works ok, just wondering what other options there are.

          Comment


            #6
            You can take a look at what C# / MSDN offers you in this regard, some users successfully read data from a SQL database for example.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              So is Ninja script C#? I know a lot of different languages so that's not an issue. I just don't know what Ninja script is.

              Comment


                #8
                Hi,

                Yes, it is.

                Please see here for more info:
                http://www.ninjatrader.com/support/f...ad.php?t=33929

                Use the arrows in the upper right corner to scroll through the documentation.
                Vince B.NinjaTrader Customer Service

                Comment


                  #9
                  That's perfect! Thanks.

                  Comment


                    #10
                    Where do I get ninja trader from? Where is the download link?

                    Comment


                      #11
                      In their website.
                      Register and they will send you an activation key via the email you registered it and then you can download the exe.

                      Comment


                        #12
                        Hello,

                        Thanks freewind!

                        Yep. Download link is on our website below

                        http://www.ninjatrader.com/webnew/do...g_software.htm

                        Let me know if I can be of further assistance.
                        BrettNinjaTrader Product Management

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by WiseAmo, Today, 04:34 PM
                        1 response
                        10 views
                        0 likes
                        Last Post aseef
                        by aseef
                         
                        Started by kiddads, Today, 05:23 PM
                        0 responses
                        2 views
                        0 likes
                        Last Post kiddads
                        by kiddads
                         
                        Started by gtheaded, Today, 04:38 PM
                        0 responses
                        10 views
                        0 likes
                        Last Post gtheaded  
                        Started by trader252, Today, 04:34 PM
                        0 responses
                        14 views
                        0 likes
                        Last Post trader252  
                        Started by Don22Trader1, Today, 04:20 PM
                        0 responses
                        9 views
                        0 likes
                        Last Post Don22Trader1  
                        Working...
                        X