I would like to modify an existing backtesting formula packaged in the "Backtesting " folder from a 10 MA to a 3 period with a 3 offset. The existing file is named BtMovingAverage.efs I am just starting to learn the programming language. Support could not help and suggested I go to this forum. I want to go long when the bar closes above the MA line and get out of the trade after the bar closes below the line. Of course just the opposite for shorts. I am using an 89tick chart.
Announcement
Collapse
No announcement yet.
Backtesting with 3 period with an offset
Collapse
X
-
Hello thartgrove,
The only thing you need to do is modify line 17 as follows.
You use the offsetSeries() function to offset the moving average series by 3 bars. I would also recommend saving your modified file with a different name to preserve the original file. If you upgrade in the future, the installer will overwrite your changes if you do not save your changes under a different file name.
To begin learning more about programming with JavaScript for your custom EFS development needs, please visit the resources below my signature.Jason K.
Project Manager
eSignal - an Interactive Data company
EFS KnowledgeBase
JavaScript for EFS Video Series
EFS Beginner Tutorial Series
EFS Glossary
Custom EFS Development Policy
New User Orientation
Comment