Forums › ProRealTime English forum › ProOrder support › AWSM (5,34) on DAX 30 minutes › Reply To: AWSM (5,34) on DAX 30 minutes
12/04/2017 at 9:23 AM
#54637
ok, so let’s restart it from scratch, I made this little indicator to spot buy signals:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
ChaosAO=Average[5](MedianPrice)-Average[34](MedianPrice) r=255 g=0 if ChaosAO>ChaosAO[1] then r=0 g=255 endif if ChaosAO>ChaosAO[1] and ChaosAO[1]<ChaosAO[2] and ChaosAO<0 then drawarrowup(barindex,ChaosAO) endif return ChaosAO coloured(r,g,0) style(histogram) |
and this is the adapted code to add into an automated trading strategy code:
1 2 3 4 5 |
ChaosAO=Average[5](MedianPrice)-Average[34](MedianPrice) if ChaosAO>ChaosAO[1] and ChaosAO[1]<ChaosAO[2] and ChaosAO<0 then buy 1 contract at market endif |
There’s no need of the signal line, only the histogram is important as per your description. Hope it’s ok now 🙂