Hello,
I´m Learning how to use the multi timeframe but have difficulties in understanding certain parts.
My problem is when I call the indicator with more than one variable. If i want to use only one of the variables returned from the called indicator how do i do it without putting in a condition that is irrelevant(RSI is always above 0). see codes below.
As an example ive put RSi in 2 different timeframes as an example.
if i only want 1 condition from the indicator in the screener how do i do it?
For example if i don´t need cond4 in screener below but have two returned variables from the indicator, how to only use one?
This is only an example to clarify my question my real indicator/screener is more complex which means that I have to write irrelevant conditions, but maybe i have to?
Hope I explain my problem somewhat clear
//P
//Indicator
MyRSI14=RSI[14](close)
MyRSI2=RSI[2](close)
Return Myrsi14 as”myrsi14″,myrsi2 as “myrsi2”
// sample screener code
Timeframe(daily)
Myrsi14, myrsi2=call “myrsi”
cond1=myrsi2>6
cond2=myrsi14>50
Timeframe(1 hour)
Myrsi14h, myrsi2h=call “myrsi”
cond3=myrsi14h>50
cond4=myrsi2h>0
SCREENER[cond1 and cond2 and cond3 and cond4]
>> For clarity of messages on ProRealCode’s forums, please use the “insert code PRT” button to separate the text of the code part! Thank you! <<
🙂
Remove line 16 and “AND Cond4” from line 17, then replace MyRsi2h in line 14 with the keyword ignored.
Line 14 should then read:
Myrsi14h, ignored=call “myrsi”
Great!! Thank You it helps me a lot.
I wish you and your loved ones a marvellous weekend!
Will keep the insert prt code button in mind next time.
//P