NinjaTrader Support Forum  
X

Attention!

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


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 04-21-2011, 01:37 AM   #1
astrolobe
Senior Member
 
Join Date: Oct 2007
Location: Sydney
Posts: 311
Thanks: 0
Thanked 0 times in 0 posts
Default Forex pair conversion

How do I access the bid price for a forex pair that is not the pair on which my strategy is running?
For example, I am running a strategy on the AUDCAD, but as part of my money management code, I need to get the bid for the AUDUSD.

thanks
astrolobe is offline  
Reply With Quote
Old 04-21-2011, 01:40 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,404
Thanks: 252
Thanked 973 times in 956 posts
Default

You would need to Add() the needed data and then use for example GetCurrentBid in this BIP context or OnMarketData() to get the bid.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 04-21-2011, 02:53 AM   #3
astrolobe
Senior Member
 
Join Date: Oct 2007
Location: Sydney
Posts: 311
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks Bertrand,
What is BIP, and is there a way to use DDE from within a strategy?
astrolobe is offline  
Reply With Quote
Old 04-21-2011, 03:21 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,404
Thanks: 252
Thanked 973 times in 956 posts
Default

BIP would stand for BarsInProgress so the series that is currently calling the OnBarUpdate() :

http://www.ninjatrader.com/support/h...inprogress.htm

Interfacing via DDE would unfortunately not be supported, but you could store values perhaps in txt files via NinjaScript and then access them within your external application.
NinjaTrader_Bertrand is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pair trading sungtaeyoo ATM Strategies (Discretionary Trading) 3 04-06-2011 09:05 AM
Forex and Emini futures pair trading freewind Miscellaneous Support 1 10-19-2010 02:38 PM
Inverse Y axis for Forex to Futures price conversion Turtle Trader Indicator Development 4 04-28-2010 10:00 AM
Creating your own spread/pair eha19 Charting 4 05-28-2009 01:31 PM
Scalping a range bound Forex Pair Serutuf Strategy Development 3 12-31-2008 06:23 AM


All times are GMT -6. The time now is 12:55 PM.