![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
|
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
Price-Dynamics.com
A NinjaTrader Official Partner Visit http://www.price-dynamics.com to learn more about the Rhythm Relay trading system. Yes, you can discretionary or auto-trade with 75%+ accuracy! Use our Contact Us page to request free access to our daily Trader's Lounge where you can see the system in action in a live account! |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Mar 2012
Location: Denver, CO
Posts: 1,200
Thanks: 137
Thanked 183 times in 182 posts
|
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.
JC
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
|
Yes, I think I can use the GetCurrentAsk and GetCurrentBid to do what I need. Thanks!
Price-Dynamics.com
A NinjaTrader Official Partner Visit http://www.price-dynamics.com to learn more about the Rhythm Relay trading system. Yes, you can discretionary or auto-trade with 75%+ accuracy! Use our Contact Us page to request free access to our daily Trader's Lounge where you can see the system in action in a live account! |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| cant get data on mini markets | salhansen | Version 7 Beta General Questions & Bug Reports | 1 | 11-13-2009 09:44 AM |
| Foreign Markets | rtj4201 | Charting | 2 | 01-13-2009 12:24 PM |
| other markets | Bypass98 | Connecting | 2 | 01-08-2009 05:52 AM |
| Two Way Markets supported? | altrader | Connecting | 1 | 03-10-2008 09:59 AM |
| NT5 In Fast Markets | al_gorithm | Miscellaneous Support | 4 | 12-05-2005 02:10 PM |