Short Name: HistoRange
Definition: In a for loop, a utility representing the entire set of data
Usage: for(0,histoRange)
Objective:
- Used in a For loop, as an adaptive length of the loop
- It is highly recommended to use historange rather than a given number, as Mastock adapts the value returned by historange to the current density of data to be displayed and finfs the most effective solution to display data without non required calculations
Note:
- Does return a value representing the optimum length of a For loop
Examples:
- OBV:
- leVol = reverse(volume)
- leClose = reverse(close)
- leClose1 = shiftedRight(leClose,1)
- test = leClose < leClose1
- accumulate(obv0,0)
- for(0,histoRange)
- if(var(test,0)) then
- dummyPlus = var(leVol,0) + var(obv0,0)
- accumulate(obv0,dummyPlus)
- else
- dummyMoins = 0 - var(leVol,0) + var(obv0,0)
- accumulate(obv0,dummyMoins)
- endif
- endfor
- notifyresult(reverse(obv0))