OBV

Hi
I need some help to create a script to the indicator OBV when he cross de MA20 days, when he cross up TRUE and he cross down false. Is it possible?
Thanks by adavnce.
Best Regards
Bruno Freitas

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:

//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.

Ex3