Hi,
I found an interesting strategy in https://www.multicharts.com/support/bas ... -breakout/
May I ask what is the following calculation for please? Thanks.
VALUE1=@MOMENTUM(C,3);
VALUE2=@MOMENTUM(C,3)[1];
VALUE3=0.3*(VALUE1-VALUE2)+(1-0.3)*VALUE3;
VALUE4=WAVERAGE((VALUE3),6);
VALUE5=@RSI(C,9)+VALUE4;
Trend line breakout
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Trend line breakout
The way I understand that code is:
This calculates the 3-bar momentum of closing prices and puts that value in the `value1` variable. Then the code calculates the 3-bar momentum of the close for the previous bar. That value is put into the `value2` variable.
This takes 30% of the difference in the current 3-bar momentum and the previous 3-bar momentum. It then adds 70% of the current value of the `value3` variable. Why it does this I don't know.
This calculates the 6-bar weighted average of the `value3` variable.
This calculates the 9-bar relative strength index (RSI) based on closing prices. It then adds the 6-bar weighted average.
Hope this helps a little.
Code: Select all
VALUE1=@MOMENTUM(C,3);
VALUE2=@MOMENTUM(C,3)[1];
Code: Select all
VALUE3=0.3*(VALUE1-VALUE2)+(1-0.3)*VALUE3;
Code: Select all
VALUE4=WAVERAGE((VALUE3),6);
Code: Select all
VALUE5=@RSI(C,9)+VALUE4;
Hope this helps a little.