NexusFi: Find Your Edge


Home Menu

 





New bar in tow data streams


Discussion in EasyLanguage Programming

Updated
    1. trending_up 1,111 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

New bar in tow data streams

  #1 (permalink)
westofpluto
Encinitas
 
Posts: 4 since Jan 2019
Thanks Given: 0
Thanks Received: 0

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?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
NexusFi Journal Challenge - April 2024
Feedback and Announcements
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Request for MACD with option to use different MAs for fa …
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
58 thanks
Battlestations: Show us your trading desks!
56 thanks
NexusFi site changelog and issues/problem reporting
48 thanks
What percentage per day is possible? [Poll]
31 thanks
GFIs1 1 DAX trade per day journal
29 thanks

  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623


westofpluto,

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.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #4 (permalink)
westofpluto
Encinitas
 
Posts: 4 since Jan 2019
Thanks Given: 0
Thanks Received: 0


ABCTG View Post
westofpluto,

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.

Regards,

ABCTG

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.

Reply With Quote
  #5 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

westofpluto,

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.

Regards,

ABCTG


westofpluto View Post
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.


Follow me on Twitter Reply With Quote





Last Updated on January 22, 2019


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts