Optuma Forums › Optuma Scripting › Price percent amount above the moving average › Reply To: Price percent amount above the moving average
July 29, 2019 at 11:52 am
#54167
- Topics: 5
- Replies: 670
- Posts: 675
Hi Paul,
The following script will display the value (in %) the close price of a chart is from a 200SMA:
1 2 3 4 5 6 7 |
//Set Variables V1 = MA(BARS=200) ; V2 = CLOSE(); //Formula for % from MA 100 * (V2-V1)/V1 |
This is how the script would look on a Show View (below the chart):