heiken ashi code

Questions directed to our Support Team. Responses can be expected within 24 hours.

heiken ashi code

Postby taowave » Fri Sep 28, 2012 12:27 pm

hi pete,
been playing around with heiken ashi,and wanted to see if it was possible to run auto-tests on some rules.
As I have found,there are many variations of HA,and I would like to test the difference betwen the rules
In its simplest form,my buy and sell rules would be

Buy=Haclose>=Haopen;
Sell=Haclose<=Haopen;

Below are two sets of HA formulas.If i am not mistaken,all I have to do is code up some custom formulas and I should be good to go.None of these rules ar very complex.I dint see the min/max formulas in SS?I assume they exist?Can they select one out of three fields?

Thanks,

allan


/*ModClose = (Open+High+Low+Close)/4
An average of the four prices of the current bar

ModOpen = [ModOpen(Previous Bar) + Close(Previous Bar)]/2
The midpoint of the previous bar

ModHigh = Max(High, ModOpen, ModClose)
The Highest value of the three prices.

ModLow = Min(Low, ModOpen, ModClose)
The Lowest value of the three prices./*

------------------------------------------


haClose = (O+H+L+C)/4

haOpen = (haOpen (previous bar) + haClose(previous bar))/2

haHigh = Maximum(H, haOpen, haClose)

haLow = Minimum(L, haOpen, haClose)
taowave
 
Posts: 584
Joined: Sat Dec 02, 2006 12:39 pm

Re: heiken ashi code

Postby Overload » Fri Sep 28, 2012 4:24 pm

Those formulas in StrataSearch are named lower() and higher(). Since the formulas only evaluate 2 values, you'll need to layer them to evaluate 3 values. For example: lower(A, lower(B, C))

Pete
Overload
 
Posts: 2248
Joined: Wed Nov 30, 2005 12:14 pm

Re: heiken ashi code

Postby taowave » Fri Sep 28, 2012 4:38 pm

Thanks Pete



Overload wrote:Those formulas in StrataSearch are named lower() and higher(). Since the formulas only evaluate 2 values, you'll need to layer them to evaluate 3 values. For example: lower(A, lower(B, C))

Pete
taowave
 
Posts: 584
Joined: Sat Dec 02, 2006 12:39 pm


Return to Technical Support

cron