The Initialize method is called first. Override this method to instantiate indicators or other objects you will need during your model's processing.
The Execute method is called once for each bar of data in the history. Override this method to implement your model's trading logic. You are passed the current index into the historical data in the idx parameter.
The classic "Seventeen liner" strategy ;)
You will need to Sign In in order to save your Models.
When saving a Model, provide a short and descriptive name that summarizes its spirit.
Also, provide a brief description that explains the logic of your Model, and any other interesting background material you'd like to include.
When you're ready, please Publish your Model so other members of the Quantacula community can review and learn from it.
Remember, in the free membership, you can save only 3 non-published Models. Publish a Model to open up one of your free Model slots. Premium members can save an unlimited number of private Models.
The settings here control what data is used when you backtest your Model, as well as the position sizing. Settings information is saved when you save your Model.
|Maximum Drawdown %|
|Maximum Drawdown Date|
|Interest and Commission||Model||Benchmark|
|Cash Interest Earned|
|Margin Interest Paid|
|Number of Positions|
|Number of NSF Positions (not taken)|
|Average Profit %|
|Average Hold Time (Bars)|
|Number of Winners|
|Winners Avg Profit|
|Winners Avg Profit %|
|Winners Avg Hold Time (Bars)|
|Number of Losers|
|Losers Avg Loss|
|Losers Avg Loss %|
|Losers Avg Hold Time (Bars)|
|Position||Symbol||Quantity||Entry Date||Entry Price||Last Price||Profit||Profit %|
|Position||Symbol||Quantity||Entry Date||Entry Price||Exit Date||Exit Price||Profit||Profit %|