Announcement

Collapse
No announcement yet.

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

    #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!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      579 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      334 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      554 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X