Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Programming for Forex markets

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

    Programming for Forex markets

    I am developing a strategy to trade Forex instruments. I am using the FXCM beta connection.

    I understand that the chart only shows the bid price. However, when I place a Buy Limit order, it will only execute at the ask price. The strategy is only seeing the bid price -- so how do I get the strategy to know when to look at the bid and when to look at the ask for limit orders to know when they should get filled? Is there a separate data series for each?

    Is there a way to switch a chart from bid to ask price, like the FXMC Trading Station II charts?

    Thanks!
    Bryan
    cassb
    NinjaTrader Ecosystem Vendor - Logical Forex

    #2
    Hello cassb,

    How are you placing the Buy Limit order?

    You can be able to see the current bid and ask price by using the GetCurrentAsk() and GetCurrentBid(). Alternatively, you can use the OnMarketData() to be able to view the price of the ask and bid price. See the following links for references.

    GetCurrentAsk(): http://www.ninjatrader.com/support/h...currentask.htm

    GetCurrentBid(): http://www.ninjatrader.com/support/h...currentbid.htm

    OnMarketData(): http://www.ninjatrader.com/support/h...marketdata.htm

    There is not an option to change what price type a chart is going to plot unless you use a custom bar type. Creating custom bar types is not supported by NinjaTrader. However, you can review source code for existing bar types and could create your own as well. Note that you will need something like Visual Studio or a text editor to open this file here:
    (My) Documents -> NinjaTrader 7 -> bin -> Custom -> Type -> @BarTypes.cs

    Happy to be of further assistance.
    JCNinjaTrader Customer Service

    Comment


      #3
      Yes, I think I can use the GetCurrentAsk and GetCurrentBid to do what I need. Thanks!
      cassb
      NinjaTrader Ecosystem Vendor - Logical Forex

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by JoMoon2024, Today, 06:56 AM
      0 responses
      6 views
      0 likes
      Last Post JoMoon2024  
      Started by Haiasi, 04-25-2024, 06:53 PM
      2 responses
      19 views
      0 likes
      Last Post Massinisa  
      Started by Creamers, Today, 05:32 AM
      0 responses
      6 views
      0 likes
      Last Post Creamers  
      Started by Segwin, 05-07-2018, 02:15 PM
      12 responses
      1,786 views
      0 likes
      Last Post Leafcutter  
      Started by poplagelu, Today, 05:00 AM
      0 responses
      3 views
      0 likes
      Last Post poplagelu  
      Working...
      X