multi data strategy  [SOLVED]

Questions about MultiCharts and user contributed studies.
moreno
Posts: 22
Joined: 29 May 2019
Has thanked: 19 times

multi data strategy

Postby moreno » 15 Apr 2020

Hi all,
trying to build a multi time frame strategy with RSI.
somehow the data2 doesn't act as it should be. data1 is ok.
that's mean if I try the strategy with only one of the time frames, just data1 (main chart) bring accurate results.
running only data2 show weird results' and both data1+data2 (as the code below) doesn't show anything.
2 RSI indicators attached to 2 sub-charts respectively.
1 tick resolution.
reading several earlier posts with the subject didn't help.
compile the strategy is OK.
the code I wrote:

Code: Select all

inputs: Price( Close ), Length( 14 ), OverSold( 30 ) ; variables: RSI10(0), RSI20(0) ; RSI10 = RSI(Price, 14 ); RSI20 = RSI(Close of data2, 14 ); condition1 = Currentbar > 1 and RSI10 < 0 and RSI20 < 0 ; if condition1 then Buy ( "RsiLE" ) this bar at close ;
May you help me, please?
Last edited by moreno on 16 Apr 2020, edited 1 time in total.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: multi data strategy

Postby TJ » 15 Apr 2020

See posts #1 & #2
viewtopic.php?t=11713

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: multi data strategy  [SOLVED]

Postby TJ » 16 Apr 2020

See post #5
Data2
viewtopic.php?t=6929


Return to “MultiCharts”