NexusFi: Find Your Edge


Home Menu

 





Multi-Data Strategy Questions


Discussion in MultiCharts

Updated
    1. trending_up 403 views
    2. thumb_up 1 thanks given
    3. group 3 followers
    1. forum 9 posts
    2. attach_file 3 attachments




 
Search this Thread
  #1 (permalink)
 
Sinatra Fan's Avatar
 Sinatra Fan 
Orlando FL
 
Experience: Intermediate
Platform: MultiCharts, Ninja
Trading: Emini ES
Posts: 90 since May 2019
Thanks Given: 8
Thanks Received: 10

I want to create a strategy with 2 or 3 symbols on the same chart (they are all the same symbol ES/MES but different timeframes/tick values, OHLC/renko) and have some questions:

1) Does the strategy trade off of only 1 Data (ie Data1 ?)

2) I'm thinking of doing this because I want to create indicators off of two of the data types and the third would be a 1-tick bar instead of going intra bar to test for an entry based on price. Question then would be, if I hide two of the symbols, will the strat still function correctly?

3) Last, how does the strat results display on chart? if all three data/instruments are the same symbol, will they show up on the one symbol I don't hide?

Thanks for the help.


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Tech-Savvy Trader Seeking Collaboration with Trading Pla …
Emini and Emicro Index
DOM in QTrader vs Bookmap
Platforms and Indicators
Need TOS RSI Converted to NT8
NinjaTrader
Requesting replay data for...
NinjaTrader
Cocretum bands convert to NinjaTrader8
NinjaTrader
 
  #2 (permalink)
 
Sinatra Fan's Avatar
 Sinatra Fan 
Orlando FL
 
Experience: Intermediate
Platform: MultiCharts, Ninja
Trading: Emini ES
Posts: 90 since May 2019
Thanks Given: 8
Thanks Received: 10

Another question to throw out there.

Are strategies allowed to test data from a data series that is HIDDEN? I'm asking because I am trying to write a strat and added code for a hidden instrument and it gave me an error.


Started this thread Reply With Quote
  #3 (permalink)
 
FuManChou's Avatar
 FuManChou 
Saint Paul, Minnesota, United States
 
Experience: Intermediate
Platform: MultiCharts
Broker: Edge Clear LLC
Trading: MNQ
Frequency: Many times daily
Duration: Hours
Posts: 109 since Jun 2019
Thanks Given: 1,139
Thanks Received: 122


This is from my experience. I am working on my own multi-data system as well. Hope this helps.

1) Does the strategy trade off of only 1 Data (ie Data1 ?)

Answer: as far I as I can tell, all order placed must be done on Data1. Signals can be generated on other data sources (Data2, Data3, ...) but it can only be placed on Data1.

2) I'm thinking of doing this because I want to create indicators off of two of the data types and the third would be a 1-tick bar instead of going intra bar to test for an entry based on price. Question then would be, if I hide two of the symbols, will the strat still function correctly?

Answer: The system will still create signals if the other instruments are hidden.

3) Last, how does the strat results display on chart? if all three data/instruments are the same symbol, will they show up on the one symbol I don't hide?

Answer: I have been playing around with this and it does not look pretty when hiding other data sources (data2, data3, ...) but keeping the indicators of those sources. Example, if you have EMA based off Data2 where Data2 is hidden, but display it on top of Data1 charts, scaling will be a bit off. However, you can change the indicator line types and colors to make it easier.


"Opportunity comes often. It knocks as often as you have a trained ear to hear it, an eye trained to see it, a hand trained to grasp it, and a head trained to use it." -Anonymous
Reply With Quote
Thanked by:
  #4 (permalink)
 
Sinatra Fan's Avatar
 Sinatra Fan 
Orlando FL
 
Experience: Intermediate
Platform: MultiCharts, Ninja
Trading: Emini ES
Posts: 90 since May 2019
Thanks Given: 8
Thanks Received: 10

Question Fu,

Can you hide Data1 and still be able to place trades on it?

UPDATE, I went back to one instrument and IOG and almost got it, but for some reason, only the entry signals that are generated when BarStatus = 2. So I am not getting the results I want. Close, but not good enough for me.

So, back to the Multi data, but instead of 3, I am going to get rid of the Flex Renko bar and simply have a 1 tick that is hidden and another OHLC bar at a different interval for my indicators.

SO>>>>>>>>>> If my 1-tick instrument is hidden, will trades still get placed and maybe show up on my OHLC which is the same instrument but a different interval?


Started this thread Reply With Quote
  #5 (permalink)
 
FuManChou's Avatar
 FuManChou 
Saint Paul, Minnesota, United States
 
Experience: Intermediate
Platform: MultiCharts
Broker: Edge Clear LLC
Trading: MNQ
Frequency: Many times daily
Duration: Hours
Posts: 109 since Jun 2019
Thanks Given: 1,139
Thanks Received: 122


Sinatra Fan View Post
Question Fu,

Can you hide Data1 and still be able to place trades on it?

UPDATE, I went back to one instrument and IOG and almost got it, but for some reason, only the entry signals that are generated when BarStatus = 2. So I am not getting the results I want. Close, but not good enough for me.

So, back to the Multi data, but instead of 3, I am going to get rid of the Flex Renko bar and simply have a 1 tick that is hidden and another OHLC bar at a different interval for my indicators.

SO>>>>>>>>>> If my 1-tick instrument is hidden, will trades still get placed and maybe show up on my OHLC which is the same instrument but a different interval?


So I tested this with my double data source (data1 & data2, both hidden) strategy and was able to get a strategy performance report. The market was closed so I was not able to test it with live data (on sim account). So it is safe to say it would work. See attachment. It shows the candles both hidden but the indicators (Bollinger Band x2).


"Opportunity comes often. It knocks as often as you have a trained ear to hear it, an eye trained to see it, a hand trained to grasp it, and a head trained to use it." -Anonymous
Attached Thumbnails
Click image for larger version

Name:	Hidden Data.png
Views:	16
Size:	74.8 KB
ID:	342186  
Reply With Quote
  #6 (permalink)
 
Sinatra Fan's Avatar
 Sinatra Fan 
Orlando FL
 
Experience: Intermediate
Platform: MultiCharts, Ninja
Trading: Emini ES
Posts: 90 since May 2019
Thanks Given: 8
Thanks Received: 10

Fu,

OK, that's good to see. I do have a few questions:

1) Does every variable need to be declared at a specific data number? And if not, when do they need to be?

2) Do Inputs for FUNCTIONS need to include the data number when the inputs are from variables of a strategy?

3) Can FUNCTIONS be called to calculate tests with price from a specific or multiple data numbers and if so, how do I do this correctly?


Started this thread Reply With Quote
  #7 (permalink)
 
FuManChou's Avatar
 FuManChou 
Saint Paul, Minnesota, United States
 
Experience: Intermediate
Platform: MultiCharts
Broker: Edge Clear LLC
Trading: MNQ
Frequency: Many times daily
Duration: Hours
Posts: 109 since Jun 2019
Thanks Given: 1,139
Thanks Received: 122

Yes. Every variable, input, function will have to end with 'Data2' or it is assumed to be data1. See example below of multiple data sources below that I just made up but I hope you can understand more.

//---------inputs---------

Inputs:
ATR_Length1(1),
ATR_Length2(1);

//---------variables---------

variables:
ATRFast (0),
ATRSlow (0),
ATR_Data1 (0),
ATR_Data2 (0);

//---------Logic---------

ATRFast = (AvgTrueRange(ATR_Length1) * ATR_Data1) Data1;
avgFast = MedianPrice Data1;

ATRSlow = (AvgTrueRange(ATR_Length2) * ATR_Data2 ) Data2;
avgSlow = MedianPrice Data2;

//---------Entries---------

if Close Data2 > Close Data1 and Open Data1 > Open Data2 then buy next bar at market;


"Opportunity comes often. It knocks as often as you have a trained ear to hear it, an eye trained to see it, a hand trained to grasp it, and a head trained to use it." -Anonymous
Reply With Quote
  #8 (permalink)
 
Sinatra Fan's Avatar
 Sinatra Fan 
Orlando FL
 
Experience: Intermediate
Platform: MultiCharts, Ninja
Trading: Emini ES
Posts: 90 since May 2019
Thanks Given: 8
Thanks Received: 10


FuManChou View Post
Yes. Every variable, input, function will have to end with 'Data2' or it is assumed to be data1. See example below of multiple data sources below that I just made up but I hope you can understand more.

//---------inputs---------

Inputs:
ATR_Length1(1),
ATR_Length2(1);

//---------variables---------

variables:
ATRFast (0),
ATRSlow (0),
ATR_Data1 (0),
ATR_Data2 (0);

//---------Logic---------

ATRFast = (AvgTrueRange(ATR_Length1) * ATR_Data1) Data1;
avgFast = MedianPrice Data1;

ATRSlow = (AvgTrueRange(ATR_Length2) * ATR_Data2 ) Data2;
avgSlow = MedianPrice Data2;

//---------Entries---------

if Close Data2 > Close Data1 and Open Data1 > Open Data2 then buy next bar at market;

So your code example is that of a "Strategy" or a "Function"???

I ask because I've broken my strat into as many functions as possible to try to keep it clean and to run more efficiently. I saw in the EL programmers guide an example as shown in the pic below. My concern is that I have FUNCTIONS with MANY variables. I half to believe that if I code it this way with "of Data 2" after the function and the parameters, then that would mean that ALL the variables are referencing data from DATA2, correct?


Attached Thumbnails
Click image for larger version

Name:	EL Multi Data.jpg
Views:	10
Size:	42.8 KB
ID:	342191  
Started this thread Reply With Quote
  #9 (permalink)
 
FuManChou's Avatar
 FuManChou 
Saint Paul, Minnesota, United States
 
Experience: Intermediate
Platform: MultiCharts
Broker: Edge Clear LLC
Trading: MNQ
Frequency: Many times daily
Duration: Hours
Posts: 109 since Jun 2019
Thanks Given: 1,139
Thanks Received: 122


Sinatra Fan View Post
So your code example is that of a "Strategy" or a "Function"???

I ask because I've broken my strat into as many functions as possible to try to keep it clean and to run more efficiently. I saw in the EL programmers guide an example as shown in the pic below. My concern is that I have FUNCTIONS with MANY variables. I half to believe that if I code it this way with "of Data 2" after the function and the parameters, then that would mean that ALL the variables are referencing data from DATA2, correct?

Sorry for confusion. The example I have was a strategy. I am learning this myself as well. For a function, the only way I got it to work is to encapsulate it with a parentheses "()". However, your strategy could be more complicated than mine.

So it would be something like below. Where Function1 is the same but used by different data sources.

Value1 = (Function1(Price, Length1) Data1)
Value2 = (Function1(Price, Length2) Data2)
Value3 = ((Function1(Price, Length1) Data1) + (Function1(Price, Length2) Data2)) / (a+b))


"Opportunity comes often. It knocks as often as you have a trained ear to hear it, an eye trained to see it, a hand trained to grasp it, and a head trained to use it." -Anonymous
Reply With Quote
  #10 (permalink)
 
Sinatra Fan's Avatar
 Sinatra Fan 
Orlando FL
 
Experience: Intermediate
Platform: MultiCharts, Ninja
Trading: Emini ES
Posts: 90 since May 2019
Thanks Given: 8
Thanks Received: 10


OK, so....

I wrote a simple test code called "_TEST Data2" that has the following code:

 
Code
variables:
	BarCnt( 0 ) ;

If	BarStatus(2) = 2 then BarCnt = BarCnt + 1;
Commentarycl("BarCnt = "	,BarCnt:4:0);
I applied it to a chart with the following instruments:

DATA1: FlexRenko bar chart MESH25 I chose to HIDE this from the chart so you can see what's going on
DATA2: 25 Tick bar chart MESH25

I inserted the strat _TEST Data2 and clicked on Bar 12 of the tick bar showing. See picture. The commentary said the BarCnt = 13934!!!! How is this possible?
BarCnt screenshot2


Started this thread Reply With Quote




Last Updated on January 23, 2025


© 2025 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 - Downloads - Top
no new posts