I noticed that simply having an input that uses Data2 will affect the trade signals even if none of the trading logic references the Data2 input.
I loaded AAPL charts for 01/01/2017 to present date with 10 minute chart as Data 1 and 1 hour chart as Data 2.
I then put this simple signal on the chart:
Code: Select all
Inputs:
Price (Close) ;
Variables:
MovAvg (0) ,
SDev (0) ,
NumbrStdDevs (0) ;
MovAvg = AverageFC (Price, 20) ;
SDev = StandardDev (Price, 20, 1) ;
NumbrStdDevs = (Price - MovAvg) / SDev ;
// Order Logic
If
NumbrStdDevs < -2.0 // Well oversold
then buy next bar at market ;
If
NumbrStdDevs > 2.0 // Well overbought
then sell next bar at market ;
I noticed that if I added an input based on Data2 it would change the Strategy Performance Report. By simply adding an additional input:
Code: Select all
Inputs:
Price (Close) ,
Price2 (Close Data2) ;
Here is the full code with the additional input so you can see that nothing else changed except the addition of an input:
Code: Select all
Inputs:
Price (Close) ,
Price2 (Close Data2) ;
Variables:
MovAvg (0) ,
SDev (0) ,
NumbrStdDevs (0) ;
MovAvg = AverageFC (Price, 20) ;
SDev = StandardDev (Price, 20, 1) ;
NumbrStdDevs = (Price - MovAvg) / SDev ;
// Order Logic
If
NumbrStdDevs < -2.0 // Well oversold
then buy next bar at market ;
If
NumbrStdDevs > 2.0 // Well overbought
then sell next bar at market ;