Hi,
I am learning how to write formulas in Metastocks.
I was following some exercise until I was ask to do this.
Question: Suppose you wanted to vary the ROC() function based on the RSI. When the 14-period RSI is getting near its overbought and oversold regions, the rate f change might be far more important then when the RSI is in its mid-ranges. Taking such a premise as truth, you might wish to use a 1-period rate of change in the overbought and oversold ranges and a 3 period rate of change elsewhere. Write a forumla to do this and name it Variable ROC Average. Use the same 20-Period moving average and treat values above 70 and below 30 as overbought and oversold ranges.
My answer is this:
If((RSI(14)>70) OR (RSI(14)<30),Mov(ROC(C,1,$),20,S), Mov(ROC(C,3,$),20,S))
This is the correct answer:
Mov((If(RSI(14)>70 OR RSI(14)<30,ROC(C,1,$),ROC(C,3,$))),20,S)
I thought they are logically the same but the graph produced are quite different. What is wrong with my formula??? Did I missed something? Hope someone can enlighten me.
I am learning how to write formulas in Metastocks.
I was following some exercise until I was ask to do this.
Question: Suppose you wanted to vary the ROC() function based on the RSI. When the 14-period RSI is getting near its overbought and oversold regions, the rate f change might be far more important then when the RSI is in its mid-ranges. Taking such a premise as truth, you might wish to use a 1-period rate of change in the overbought and oversold ranges and a 3 period rate of change elsewhere. Write a forumla to do this and name it Variable ROC Average. Use the same 20-Period moving average and treat values above 70 and below 30 as overbought and oversold ranges.
My answer is this:
If((RSI(14)>70) OR (RSI(14)<30),Mov(ROC(C,1,$),20,S), Mov(ROC(C,3,$),20,S))
This is the correct answer:
Mov((If(RSI(14)>70 OR RSI(14)<30,ROC(C,1,$),ROC(C,3,$))),20,S)
I thought they are logically the same but the graph produced are quite different. What is wrong with my formula??? Did I missed something? Hope someone can enlighten me.