- Topics: 36
- Replies: 1,938
- Posts: 1,974
You can’t apply an offset in a script, so Michael’s method is best for displaying on a chart but Trevor’s method would be best for scripting a scan.
Steps for the chart:
- Add your three Moving Averages to the chart.
- For each, use the “Offset” property to move the line to the left by the required amount.
NOTE: An offset of 5 is different than scripting MA(). That script would get the value from 5 bars earlier and put that in today’s value. The value is right for today, but it will not project forward.
- Then you can select all three and add them as a tool button. Jump to the 2:40 mark in this video for an example https://help.optuma.com/kb/faq.php?id=576
Hope that helps
FYI I have no problem with Trevor offering his services to help people. We have so many projects on that we can not address all the different things that people want to add. That leaves a consultation with our support staff or another client who is able to script. Obviously, we can not endorse their work since we do not control it.