Can you build a strategy to reference another chart window? MC.NET - MultiCharts | futures io social day trading
futures io futures trading


Can you build a strategy to reference another chart window? MC.NET
Updated: Views / Replies:392 / 14
Created: by BrianBacchus 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 100,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
 

Can you build a strategy to reference another chart window? MC.NET

  #1 (permalink)
Elite Member
Saint Louis
 
Futures Experience: Intermediate
Platform: MultiCharts .NET
Favorite Futures: Emini S&P
 
Posts: 15 since Oct 2015
Thanks: 7 given, 18 received

Can you build a strategy to reference another chart window? MC.NET

I know that the MaxBarsBack in .NET for strategies is the same for all data series on the same chart. That's a dumb limitation of MC.NET and I'm trying to get around it.

I want 1 tick data series
10,000 contract bars for Data2
100,000 contract bars for Data3

I want to be able to reference 2500 "bars" back on the 1 tick Data1 without going 2500 bars back on Data3. I'm trying to work around this by rebuilding the bars with tick/vol data, but I could have swore I've seen a method to program a study to reference another study on another chart. Has anyone else ever run across this?

Reply With Quote
 
  #2 (permalink)
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,839 since Apr 2013
Thanks: 298 given, 1,123 received
Forum Reputation: Legendary

BrianBacchus,

you can send data across different charts and using Globals would be one way. However it might also be possible to
reduce the required MaxBarsBack and in turn keep everything on one chart. As an example instead of looking 2500 bars back for a certain value, you could keep a list or dictionary of the required values yourself. This could theoretically bring your MaxBarsBack requirement down to one (depending on the code of course).

Regards,

ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #3 (permalink)
Elite Member
Saint Louis
 
Futures Experience: Intermediate
Platform: MultiCharts .NET
Favorite Futures: Emini S&P
 
Posts: 15 since Oct 2015
Thanks: 7 given, 18 received



ABCTG View Post
BrianBacchus,

you can send data across different charts and using Globals would be one way. However it might also be possible to
reduce the required MaxBarsBack and in turn keep everything on one chart. As an example instead of looking 2500 bars back for a certain value, you could keep a list or dictionary of the required values yourself. This could theoretically bring your MaxBarsBack requirement down to one (depending on the code of course).

Regards,

ABCTG

Huge thanks! I hadn't considered listing/dictionary so that might be the route I'd go. Researching Globals, at least in the 10 minutes since I've done so (thanks for giving me the right keyword to search!) looks like it might get more messy.

I'm pretty much learning C# as I go from writing scripts in MC .NET so a lot of this stuff is new to me.

Reply With Quote
The following user says Thank You to BrianBacchus for this post:
 
  #4 (permalink)
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,839 since Apr 2013
Thanks: 298 given, 1,123 received
Forum Reputation: Legendary

BrianBacchus,

you are welcome. When you start sending data across charts for strategies you might also run into a few additional problems - for example optimizations might become challenging or you might have to deal with avoiding "to look into the future" i.e. basically accessing data from the other charts that in real time couldn't be available at that moment etc.. In the end handling everything on one chart might be the easier approach, even if it requires a bit of coding to limit the required MaxBarsBack.

Regards,

ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #5 (permalink)
Elite Member
Saint Louis
 
Futures Experience: Intermediate
Platform: MultiCharts .NET
Favorite Futures: Emini S&P
 
Posts: 15 since Oct 2015
Thanks: 7 given, 18 received

Just FYI, here's something I ran across while I researched this issue. The 2nd item looks interesting as it has the data already inventoried without creating additional lists/dictionaries/arrays:

https://www.multicharts.com/discussion/viewtopic.php?t=45662
There are multiple ways to access data:

1) With the MaxBarsBack constraint
This is the default way, i.e. Bars.Close[1] etc.

2) Without the MaxBarsBack constraint
In this situation you can use the data of the whole data series; i.e. from Bars.FullSymbolData.Close[0] (first bar) to Bars.FullSymbolData.Close[Bars.FullSymbolData.Count] (last bar). See the MultiCharts programming manual, page 22, section 4.2.5 for this.


Last edited by BrianBacchus; May 31st, 2018 at 12:48 PM.
Reply With Quote
The following user says Thank You to BrianBacchus for this post:
 
  #6 (permalink)
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,839 since Apr 2013
Thanks: 298 given, 1,123 received
Forum Reputation: Legendary

BrianBacchus,

yes, this can be useful, but it will depend on what causes the "MaxBarsBack issue" for you. There are a few posts in the MC forum dealing with similar problems and although they are for regular MC, you might still be able to find some helpful ideas:

https://www.multicharts.com/discussion/viewtopic.php?f=1&t=51370

https://www.multicharts.com/discussion/viewtopic.php?f=1&t=50854

Regards,

ABCTG

Reply With Quote
 
  #7 (permalink)
Elite Member
Saint Louis
 
Futures Experience: Intermediate
Platform: MultiCharts .NET
Favorite Futures: Emini S&P
 
Posts: 15 since Oct 2015
Thanks: 7 given, 18 received

Also very helpful. I'm trying to use Fisher Transforms on each timeframe/data series. The higher time frames provide filters for the lowest timeframe.

The "BarsBack" for the 2 higher timeframes probably wouldn't be more than 20, but for the tick level it's going to be 2500.

Since the FisherTransform uses its own previous value to calculate present value, I'm thinking I might need to do some sort of "for" loop calling data on that Bars.FullSymbolData.Close to get present value without using the standard Bars.Close[""] structure.

It's either that, or build a dictionary of the last 2500 values of the FisherTransform indicator calculation. This is probably the most efficient since it only calls the FT calculation once per tick. I'm just not too familiar with dictionaries yet so that will require a learning process. Code-wise I'm not sure where to start.

Reply With Quote
 
  #8 (permalink)
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,839 since Apr 2013
Thanks: 298 given, 1,123 received
Forum Reputation: Legendary

BrianBacchus,

if you only need the previous value of the Fisher Transformation to compute the new one, you might not require a loop and could just just reference the previous value. However not knowing the code you are having for the Fisher Transformation I can't say for sure.
Apart from that you don't need a dictionary, you could hold the values in an array or a list. Once your array is filled, you would simply overwrite the oldest entry with the new one. This way you only have all the necessary values in your array and this might help the code performance. A list can be handled in a similar fashion or by adding the new value to the back while removing the first entry when you have the desired amount of values stored in the list.

Regards,

ABCTG

Reply With Quote
 
  #9 (permalink)
W.Coast, USA.
 
Futures Experience: Intermediate
Platform: Anything
Favorite Futures: Emini
 
Posts: 47 since Jul 2017
Thanks: 12 given, 31 received

I had a similar requirement, except with getting bid/ask data from barsofdata on subcharts. MC.NET doesn't provide bid/ask data on subcharts (i.e., subdata series).

This might help you: https://www.multicharts.com/discussion/viewtopic.php?f=19&t=45280

Reply With Quote
 
  #10 (permalink)
Elite Member
Saint Louis
 
Futures Experience: Intermediate
Platform: MultiCharts .NET
Favorite Futures: Emini S&P
 
Posts: 15 since Oct 2015
Thanks: 7 given, 18 received



ABCTG View Post
BrianBacchus,

if you only need the previous value of the Fisher Transformation to compute the new one, you might not require a loop and could just just reference the previous value. However not knowing the code you are having for the Fisher Transformation I can't say for sure.
Apart from that you don't need a dictionary, you could hold the values in an array or a list. Once your array is filled, you would simply overwrite the oldest entry with the new one. This way you only have all the necessary values in your array and this might help the code performance. A list can be handled in a similar fashion or by adding the new value to the back while removing the first entry when you have the desired amount of values stored in the list.

Regards,

ABCTG

Well... I was wrong. The FT actually needs to call back the entire "length" as it searches for the Max and Min values of Bars.Close over that length.

Honestly, I'm running into a wall here because I don't know enough about doing Arrays/lists. In this case I know I need an Array or List that collects the last 2500 values for Bar.Close. I've tried setting this up a few times in different ways but I'm doing it under CalcBar, and it's always biffing out my values to just one. Here's essentially what I'm trying to:

for (i = 0; i <= length; i++){
priceArray[i] = Bars.Close[i]
}

^ This would give me exactly what I want, but it calculates all 2500 values every bar AND it calls 2500 bars back to do so. So it still trips MaxBarsBack.

I've tried doing something like priceList.Add(Bars.Close[0]) but that also just gives me a list with only the very first close value on the chart repeated every single bar. (this was also done under CalcBar).

I'm sure the answer is something incredibly basic but I'm missing it. At this point any code help would be greatly appreciated and I'll happily share the entire finished product once I'm able to fill in this piece.

To restate the problem very simply: I need to be able to record the last 2500 values for Bars.Close without calling 2500 bars back. Some method of recording and appending a list/array as Bars.Close values come in should do it (and even better if it loses the 2501+ values since they're no longer needed).

Reply With Quote

Reply



futures io > > > > Can you build a strategy to reference another chart window? MC.NET

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Journal Challenge w/Earn2Trade and $599 in Prizes

November
 

Anthony Drager: TBA

Nov 29
 

Linda Raschke: TBA

Elite only
 

Peter Davies: TBA

Dec 6
 

Brannigan Barrett: TBA

Elite only
 

Cannon Trading: Ask Me Anything

Dec 13
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
MC .NET Objects programming reference Newt MultiCharts 3 December 20th, 2016 07:28 AM
Multicharts .NET reference guide? grimReaper MultiCharts 3 April 19th, 2013 01:55 AM
rotational trading strategy with MC.NET? jdfagan MultiCharts 1 September 25th, 2012 03:39 PM
[MC] indicator - Time Window Nicolas11 The Elite Circle 2 April 6th, 2012 02:56 PM
ATM Strategy won't appear in the strategy window on N7 PiCoTrader Traders Hideout 6 December 15th, 2010 03:41 AM


Tags
abc, bid/ask, c#, code, data series, dow, es, how to, indicator, indicators, maxbarsback, mc.net, multicharts, programming, real time, strategies, strategy, tick chart, tick data, time frames, timeframe, transformation, values

All times are GMT -4. The time now is 02:13 AM. (this page content is cached, log in for real-time version)

Copyright © 2018 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 2018-11-21 in 0.15 seconds with 14 queries on phoenix