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 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.
Can you help answer these questions from other members on NexusFi?
Best Threads (Most Thanked) in the last 7 days on NexusFi
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.
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
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
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.
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
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.
"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
I wrote a simple test code called "_TEST Data2" that has the following code:
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