Hello,
I'm using the following code to generate an "Uptrend" strategy in an 8 minute chart:
inputs:
Length( 14 ),
ADXTrend( 25 ) ;
variables:
oDMIPlus( 0 ),
oDMIMinus( 0 ),
oDMI( 0 ),
oADX( 0 ),
oADXR( 0 ),
oVolty( 0 ) ;
Value1 = DirMovement( H, L, C, Length, oDMIPlus, oDMIMinus, oDMI, oADX,
oADXR,
oVolty ) ;
if oDMIPlus > 21 and oADX > 21 and oDMIPlus > oADX then
buy ( "Up Trend" ) next bar at market ;
By itself, it works fine.
What I want to do is combine this with another indicator that uses 1 minute data. I constructed a chart with 1 minute (data1) and 8 minute (data2) symbols. I create a strategy but I am unable to make this DMI study reference the 8 minute data stream (data2) properly. I've tried referencing data2 in every possible way (except a way that works, of course).
I've created a screen shot that shows it working properly with just 8 minute data and it not working on a combined 1 min and 8 min chart.
Any help would be appreciated.
Thanks,
Kevin
Difficulty with Data Stream Aliasing on Custom DMI Strategy
Difficulty with Data Stream Aliasing on Custom DMI Strategy
- Attachments
-
- DMI_data_stream_problem.gif
- (98.3 KiB) Downloaded 499 times
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007