Optuma Forums › Optuma Scripting › OBV › Reply To: OBV
August 24, 2021 at 8:05 am
#65691
- Topics: 5
- Replies: 677
- Posts: 682
Hi,
If you are wanting the script to return a True result when the OBV crosses above the MA line, and stay true until it has crossed back below, the following script will work:
1 2 3 4 5 6 7 8 9 10 |
//Set Indicators V1 = OBV() ; V2 = MA(V1, BARS=20, CALC=Close) ; //Set Criteria V3 = V1 CrossesAbove V2; V4 = V1 CrossesBelow V2; //Set True False States SWITCH(V3,V4) |
This uses the default OVB values.