trouble adding new time series for different futures contract
I am having difficulty adding a time series for the YM contract to my strategy running on ES.
- Strategy is running on ES 12-13
- I want to add the YM 12-13 contract in order to make a few references
- Found in NT7 manual where it looks like I should just have to type the following:
However, this doesn't work when I try to reference this later in the strategy via:
- If I remove the BarsArray reference, and instead check the ATR for the main instrument (ES), the strategy will execute trades. However, if I do it the above way and try to reference the YM contract no trades are ever executed.
Can anyone help enlighten me as to why I can't seem to reference the YM contract within my code running on ES? Any suggestions are welcome. I'm sort of lost on this one...
Thanks in advance,
edit: might it have something to do with referencing the 12-13 contract and not the continuous contract? Is it possible to reference the continuous contract?
Last edited by jordis; November 20th, 2013 at 12:37 PM.
Reason: add comment
@jordis, your original code looks ok, is the strategy running in an ES Day chart as well?, otherwise there may not be enough data for YM loaded if you're in (e.g.) a 5min ES chart, (increase bars/days for the chart if so). Also is the 'less than 200' test what you want? I assume you change the numbers when you run it against the ES series?
Is there maybe a way to make a custom indicator that would only look at YM instead of ES? maybe then I could just plot that indicator and use it in the strategy instead of trying to directly reference the YM series.
basically the 200 is arbitrary. but I have an active strategy running fully automated on YM that is currently quite profitable, and I just want to run the same basic strategy on ES to see if it works there as well. however, the atr filter i use for YM cannot be easily converted over for ES, so I just wanted to "not trade" based on my YM filter, instead of trying to re-write that filter based off of ES numbers.
sounds convoluted I know, it's just frustrating me that I can't get this little test to run.
The following user says Thank You to jordis for this post:
i went ahead and got it to work about 80% just by taking this part out, but i would still like to figure out this reference issue
does anyone have any ideas for how criteria completely based on one instrument could execute trades inside another instrument? ie. signals are 100% generated from YM, but executed on ES? That's sort of what I thought I could do here, but I've failed miserably.