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 > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 07-04-2012, 06:09 AM   #1
kucharek
Member
 
Join Date: Nov 2011
Location: Warsaw, Poland
Posts: 99
Thanks: 26
Thanked 3 times in 3 posts
Default GetCurrentAsk when opened position

Hi,

I print GetCurrentAsk() and GetCurrentBid() every bar in my strategy in order to check spread in currencies.

I have just indicated that GetCurrentAsk = GetCurrentBid when I have opened position.

Is this expected behavior?
kucharek is offline  
Reply With Quote
Old 07-05-2012, 04:29 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

kucharek, I would not expect that to be seen - what broker and which pip settings under Tools > Options > Data do you use please?
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 07-05-2012, 08:40 AM   #3
kucharek
Member
 
Join Date: Nov 2011
Location: Warsaw, Poland
Posts: 99
Thanks: 26
Thanked 3 times in 3 posts
Default

Hi,

I use MB Trading and TenthPip.
kucharek is offline  
Reply With Quote
Old 07-05-2012, 09:19 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

Thanks, so would you see the same if you check the Level 1 data window for your currency in the Control Center? Do you print them both exactly at the same time in your script?
NinjaTrader_Bertrand is offline  
Reply With Quote
The following user says thank you to NinjaTrader_Bertrand for this post:
Old 07-05-2012, 09:46 AM   #5
sledge
Senior Member
 
Join Date: Aug 2010
Location: Washington, D.C.
Posts: 1,199
Thanks: 180
Thanked 303 times in 261 posts
Default

How long does this condition last?

1st print ? 10 prints? Or until position closes?

Are you using market orders?

Please post your print line.
sledge is offline  
Reply With Quote
The following user says thank you to sledge for this post:
Old 07-05-2012, 10:14 AM   #6
kucharek
Member
 
Join Date: Nov 2011
Location: Warsaw, Poland
Posts: 99
Thanks: 26
Thanked 3 times in 3 posts
Default

Your questions gave me thinking again. My mistake - something like that happens when my strategy has yellow status, instead green.

Thank you both for the support.
kucharek is offline  
Reply With Quote
Old 07-05-2012, 10:18 AM   #7
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

Thanks for reporting back and you're welcome.
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
How many opened positions? kucharek Automated Trading 1 03-16-2012 04:40 AM
How do prevent selling of our position on the same day that it was opened? tomkim General Programming 6 03-29-2010 10:07 AM
Storing data when position is opened verge Strategy Development 4 10-08-2009 09:20 AM
simple question how to close one position when more is opened nicknamed ATM Strategies (Discretionary Trading) 1 07-27-2009 03:01 AM
I have opened position I cannot close maxima Miscellaneous Support 6 06-10-2008 02:36 AM


All times are GMT -6. The time now is 02:17 PM.