ROAR Script

Can someone please help sort out my script.

I am trying to write an Optuma script that replicates Alan Hulls ROAR formula, to try and tweak it and possibly optimise some more.

I think the MetaStock function linearreg( DATA ARRAY, PERIODS) should equate to the Optuma function LRINT()

My Optuma formula is:

CUTOFF = 20; A = (200*(LRINT(BARS=52)-OFFSET(LRINT(BARS=52), OFFSET=-26))/CLOSE()); V1 = IF(A < CUTOFF,0,A) ; Plot1 = V1

Unfortunately, my script is completely out of whack with the Optuma built in ROAR indicator.

Alan’s formula is in MetaStock script.

Hull ROAR Indicator formula (Active Investing style)

Cutoff:=Input(“Cutoff”,0,200,20);
If((200*(LinearReg(C,52)-Ref(LinearReg(C,52),-26))/C)<Cutoff,0,200*(LinearReg(C,52)-Ref(LinearReg(C,52),-26))/C);

Source: Alan Hull - How to find rising shares

Cheers, Lester

QAN-ROAR-EXAMPLE-SCRIPT.owb (12.2 KB)

CUTOFF = 20; 
A = (200*(LRINT(BARS=52)-OFFSET(LRINT(BARS=52), OFFSET=-26))/CLOSE()); 
V1 = IF(A < CUTOFF,0,A) ; 
Plot1 = V1