2nd Data Series Problem - EasyLanguage Programming | futures io social day trading
futures io futures trading


2nd Data Series Problem
Updated: Views / Replies:1,570 / 7
Created: by nismo Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

2nd Data Series Problem

  #1 (permalink)
Trading Apprentice
Australia
 
Futures Experience: Beginner
Platform: Multicharts
Favorite Futures: forex
 
Posts: 32 since Dec 2010
Thanks: 7 given, 3 received

2nd Data Series Problem

Hi All,

Iím trying to create a system that uses 2 time frames / data series.

The 1st data series (primary) is 1min.
The 2nd data series is 2min.

The code executes every minute as this is the primary data series (as you would expect) but the problem is the code is excuting every minute on the 2min data series which is causing duplicate values.

You can easily see this by creating a signal with the following code:

print(close data(2):0:5);

This will output duplicate close prices for the 2nd data series. Eg:

1.30785
1.30785
1.30820
1.30820
1.30745
1.30745

How do I get prevent or get rid of the duplicate values?

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Paris, France
 
Futures Experience: Advanced
Platform: Amibroker
Favorite Futures: Futures, Stocks
 
Posts: 96 since Jun 2011
Thanks: 118 given, 102 received


This is absolutely normal since your print function will be executed at the end of every 1min bar.

However, you can build your signals with Data2.

Maybe we can help you if you give us more information about what you need to do more precisely.

Reply With Quote
 
  #4 (permalink)
Trading Apprentice
Australia
 
Futures Experience: Beginner
Platform: Multicharts
Favorite Futures: forex
 
Posts: 32 since Dec 2010
Thanks: 7 given, 3 received

What do you mean you can build your systems with data2?

I want my system to primarily use data1 and then for one bit I want to use data2.

I want to do a calculation using the last 3 closing prices of data2.

Reply With Quote
 
  #5 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,366 since Jun 2009
Thanks: 3,572 given, 3,982 received

You should post the code, it will be easier to find what's wrong in your logic.
As @TheTrend write it, it's logical to have the same value on the secondary minute bar, you will see 1min close on 50% of the 2min bar.

Success requires no deodorant! (Sun Tzu)
Reply With Quote
 
  #6 (permalink)
Elite Member
Paris, France
 
Futures Experience: Advanced
Platform: Amibroker
Favorite Futures: Futures, Stocks
 
Posts: 96 since Jun 2011
Thanks: 118 given, 102 received


nismo View Post
What do you mean you can build your systems with data2?

I want my system to primarily use data1 and then for one bit I want to use data2.

I want to do a calculation using the last 3 closing prices of data2.

Then you can use a code like that:

 
Code
if close of data2 > (close[1] of data2 + close[2] of data2 + close[3] of data2 )/3 
then buy 1 contract next bar market;
Hope that helps.

Reply With Quote
 
  #7 (permalink)
Elite Member
new york
 
Futures Experience: Beginner
Platform: Ninjatrader
Favorite Futures: ES
 
Posts: 41 since Dec 2010
Thanks: 1 given, 5 received

also, remember that OnBarUpdate() will run for all internally generated multi-series, everytime there is an update and there is a Time&Sales stamp from the exchange. If you want to access 2min data only when it closes then you can change the logic to something like this
if (BarsInProgress == 1 && FirstTickOfBar)
{
// only now access the 2min data, which is the first tick of the next 2min bar that just started forming...
}

hope this helps...

Reply With Quote
 
  #8 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,366 since Jun 2009
Thanks: 3,572 given, 3,982 received


buylosellhi View Post
also, remember that OnBarUpdate() will run for all internally generated multi-series, everytime there is an update and there is a Time&Sales stamp from the exchange. If you want to access 2min data only when it closes then you can change the logic to something like this
if (BarsInProgress == 1 && FirstTickOfBar)
{
// only now access the 2min data, which is the first tick of the next 2min bar that just started forming...
}

hope this helps...

This is for MultiCharts, no OnBarUpdate() .

Success requires no deodorant! (Sun Tzu)
Reply With Quote

Reply



futures io > > > > > 2nd Data Series Problem

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
CTA - Series 3, Series 7, Series 9, Series 10, Series 56 NASD exams certifications Big Mike Traders Hideout 41 January 15th, 2015 10:27 AM
Using DrawRegion to shade between two data series FBJS NinjaTrader Programming 6 March 6th, 2014 09:05 PM
Multiple data series code help rkepler EasyLanguage Programming 3 August 16th, 2011 10:12 AM
TF Data Series tderrick Emini Index Futures Trading 7 July 31st, 2011 01:30 PM
_ADXVMA_Alerts_v01_5 data series ryohkyo NinjaTrader Programming 5 March 6th, 2010 12:28 AM


All times are GMT -4. The time now is 05:45 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-12 in 0.10 seconds with 19 queries on phoenix via your IP 54.167.44.32