I am looking to produce a trading rule and need some help with the code.
I would like to have:
Running Maximum of the previous 14 periods
Running Minimum of the previous 14 periods
I would like to compare these running min and max to the current close and the trading rules follow:
Sell if Current Close > Running Max
Buy if Current Close < Running Min
Max/Min Rule Help [SOLVED]
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Max/Min Rule Help [SOLVED]
Look up the indicator Price Channel.I am looking to produce a trading rule and need some help with the code.
I would like to have:
Running Maximum of the previous 14 periods
Running Minimum of the previous 14 periods
I would like to compare these running min and max to the current close and the trading rules follow:
Sell if Current Close > Running Max
Buy if Current Close < Running Min