Need some help?
Documentation
Learn to use MachinaTrader and Explore Our Platform Features
Using MachinaTrader
Platform orientation during Private Beta phaseKey Concepts
Introduction to building your first AlgorithmTutorials
Growing series of video and text guides to the platformCrypto Wallets 101
Foundational knowledge about crypto wallets and securityGalaxy Quest
Earn badges, discount rewards and credits to spend in the MarketplaceMachinaTrader Community
Get support and know-how from MachinaTrader's communityThe Machina Engine manages your portfolio and data feeds letting you focus on your algorithm strategy and execution. Data is piped into your strategy via event handlers, upon which you can place trades. We provide basic portfolio management and fill modelling – under the hood and automatically. This functionality is provided by the MTAlgorithm
base class.
Design and Test Your Strategy
Code in Multiple Languages
Deploy it to Your Live Brokerage
Harness Our Cluster of Servers
Sample Code
The following code shows the core methods required for initializing your algorithm and processing data.
C#
public class BasicTemplateAlgorithm : MEAlgorithm
{
public override void Initialize()
{
// Setup algorithm requirements: cash, dates and securities.
// Initialize is called once at the start of the algorithm.
}
public override void OnData(Slice data) {
// Data requested is then piped into event handlers like this one.
}
}
Python
class BasicTemplateAlgorithm(MEAlgorithm):
def Initialize(self):
""" Initialise the data and resolution required, as well as the
cash and start-end dates for your algorithm. All algorithms must initialized."""
pass
def OnData(self, data):
""" OnData event is the primary entry point for your algorithm. Each new data
point will be pumped in here. data is a Slice object keyed by symbol containing
the stock data."""
pass