Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I am writing a strategy in EasyLanguage and this strategy uses two related data streams (eg NQ and NDX). The primary data stream is NQ (the futures contract) and the Data2 is NDX (the stock index). My understanding of easylanguage strategies is that the strategy script will be executed on every tick on Data1, ie every tick of NQ. I would like to detect when we have the first tick of BOTH data streams. In other words, how do I detect when both NQ and NDX have the first tick of the bar available?
I can use BarStatus(1) on each tick to see if this tick is the opening tick of Data1 (NQ in my case). When this occurs, I have to check Data2 (NDX) to see if I can get the current tick price there too. The problem is that Data2 may have 0 or 1 or more ticks in this current bar. I only want to execute some trading logic when I have BOTH a tick value on Data1 and a tick value for this same bar on Data2. If Data2 does not yet have a tick value then I want to wait for the next tick and check again.
Any ideas how to do this?
Can you help answer these questions from other members on NexusFi?
strategies are only processed with every tick in case of intrabar order generation. However this is not available on multi-data charts in Tradestation. One work around could be to use price series providers, but this would become a bit more complex.
Thanks. So is it still true in the latest version of Tradestation and EL that we cannot use IOG on multi-data charts? I thought this was being fixed.
If the workaround is price series providers, do you have any examples or documentation you could point me to on this? Didn't find much searching google.
One final question: How quickly does MarketPosition update? In other words, if I have IOG turned on and my strategy requests a BUY 1 contract at market, does MarketPosition suddenly start returning 1? Or is there a lag involved, so on the next tick MarketPosition may still return 0 because the order hasn't been filled yet? Basically I need to track my market position tick by tick so that if I open on one tick, i will not try to open again on the second tick.
do you have a link to where the fix was announced?
The official Tradestation forum has lots of examples involving PriceSeriesProviders and I would suggest checking them out.
MarketPosition is returning the market position for the strategy on that chart. Once the order is filled for that chart you can expect it to reflect the change and I would suggest running a few tests using the print reserved word for example, so you can see when it changes in real time.