Display Chart Label For EMA and ReverseEngineeringRSI


Category:
0
0

Hi Hahn!

Hope you are doing well. I was wondering if you could help me create a chart label for this criteria on thinkorswim.

  1. Green label with text “Buy” if: 8 EMA is above 50 Reverse Engineer RSI.
  2. Red label with text “Sell” if: 8 EMA is below 50 Reverse Engineer RSI.

Thank you so much for your help Hahn!

Marked as spam
Posted by (Questions: 9, Answers: 4)
Asked on October 16, 2021 10:49 am
47 views
0
Private answer

Here you go. All of the typical user inputs are included to allow users to adjust the settings without modifying the structure of the code:

input rsiLength = 14;
input rsiPrice = close;
input rsiValue = 50.0;
input smoothingType = {default Wilders, EMA};
input maLengthOne = 8;
input maTypeOne = AverageType.EXPONENTIAL;
input maPriceOne = close;
plot reverseRSI = ReverseEngineeringRSI(rsiLength, rsiPrice, rsiValue, smoothingType).RevEngRSI;
plot maOne = MovingAverage(maTypeOne, maPriceOne, maLengthOne);
AddLabel(yes, if maOne > reverseRSI then "Buy" else if maOne < reverseRSI then "Sell" else "None", if maOne > reverseRSI then Color.GREEN else if maOne < reverseRSI then Color.RED else Color.WHITE);

Marked as spam
Posted by (Questions: 37, Answers: 4084)
Answered on October 16, 2021 2:04 pm