ParabolicSAR set different colors for long and short


Tags:
Category:
0
0

The PSAR in TOS has one color for up and down dots.  I would like to be able to change them to different colors for up and down.  Thanks.

Marked as spam
Posted by (Questions: 1, Answers: 0)
Asked on September 11, 2019 7:22 am
161 views
0
Private answer

I had to change the title of your question so that visitors to the forum we immediately understand the context of this request. This makes it easier for those searching for a similar solution to find this post. Notice I have used the full name of the study as it appears in Thinkorswim.

To accomplish this you simply copy the entire code from the existing study and replace the final line of code:

parSAR.SetDefaultColor(GetColor(5));

With this line of code:

parSAR.AssignValueColor(if state == state.long then Color.CYAN else if state.short then Color.MAGENTA else GetColor(5));

 

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on September 11, 2019 7:38 am