Introduction: The Challenge Every Trader Faces
Imagine you have a brilliant trading idea. You have backtested it, optimized it, and you know it can make money. But now comes the hard part—turning that idea into a live, automated trading strategy.
Traditionally, this means building complex systems for market data, order management, risk controls, and broker connectivity. It takes months, costs millions, and distracts you from what really matters—your trading edge, or what traders call alpha.
Enter BlitzTrader. It changes everything.
The BlitzTrader Philosophy: You Focus on Alpha, We Handle the Rest
BlitzTrader provides a standardized strategy development framework that takes care of all the heavy lifting. You focus on your trading logic your entry rules, exit conditions, position sizing, and risk management. BlitzTrader handles everything else: market data, order routing, risk checks, execution, and monitoring.
The result? You go from idea to live trading in days, not months, without spending millions on infrastructure.
BlitzTrader chooses C# as the language for strategy development, and for good reason.
| Feature | Why It Matters |
|---|---|
| Compiled, not interpreted | C# code runs much faster than Python, which is critical for real-time trading |
| High-performance | Designed for high-frequency trading, risk management, and processing massive market data |
| Type-safe and reliable | Fewer runtime errors, more confidence in your code |
| Modern and well-supported | Full support in Visual Studio with excellent debugging tools |
In simple terms: C# gives you speed and reliability. Your strategy executes faster, and you spend less time fixing bugs.
Your Development Environment: Choose Your Favorite IDE
You write your BlitzTrader strategy in any C# development environment. The most common choice is Visual Studio (2022 or 2024), with full support for .NET C# projects.
This means you get:
• Intelligent code completion
• Powerful debugging tools
• Step-by-step execution tracing
• Easy integration with source control (Git, etc.)
Your Strategy Class: Simple and Standardized
A BlitzTrader strategy is just a simple C# class with any name you choose—for example, SpreadScalping or MeanReversionStrategy.
To get started, include references to the Blitz Strategy Development Framework DLLs in your project. Your strategy class must then inherit from StrategyBase, which gives you access to all the powerful features of BlitzTrader.
Core Methods You Implement
| Method | What It Does |
|---|---|
| OnInitialize() | Called when the strategy is created. You set up instruments and input parameters here. |
| OnStart(out string errorString) | Called when the trader starts your strategy. |
| OnStopping() | Called when the strategy is stopped by the trader. |
| BuildVersion | Assign a version number to your strategy code. |
| IVObjects | Return the list of tradable instruments your strategy needs. |
| ValidateStrategyParameter() | Validate any changes a trader makes to your input parameters. |
| OnStrategyParameterChanged() | Trigger an event when a trader changes an input parameter. |
| OnMarketDataEvent() | Major event – triggers whenever price or market data changes for your instrument. |
| OnTrade() | Triggers when a trade event is received for your instrument. |
There are many more events for finer control, but these are the core ones you will use most often. Please note that method parameters have been omitted from the descriptions for the sake of readability.
Input and Output Variables: Easy Visibility in Trader Dashboard
One of the most powerful features is the ability to declare input and output variables using simple decorators.
Input Variables (Trader Can Change)
These appear automatically in the trader dashboard, where the trader can modify them during live trading and updated values are instantly reflected in your server-side hosted strategy instance.
csharp
// Input Parameters (Trader Configurable)
[StrategyParameterAttribute("OrderLotQty", 1, "Order Lot Quantity")]
private int Input_OrderLotQty = 1;
[StrategyParameterAttribute("SLLegPercentage", 10, "SLLegPercentage")]
private double Input_SLLegPercentage = 10;
[StrategyParameterAttribute("LossLimit", 0, "LossLimit")]
private double Input_LossLimit = 0;
Output Variables (Strategy Sends to Dashboard)
These reflect live values from your strategy back to the trader dashboard.
csharp
// Output Parameters (Strategy Sends to Dashboard)
[StrategyPublishParameter("EntryRound", DefaultValue = 0, Description = "EntryRound")]
private int Output_EntryRound = 0;
IVObject: The Heart of Instrument Abstraction
In BlitzTrader, you never deal with raw instrument codes or exchange-specific details. Instead, you use IVObject—a clean, abstract representation of any tradable instrument.
csharp
// IVObject: The Heart of Instrument Abstraction
private IVObject _ivInstrument = new IVObject("Instrument", "Tradable Instrument", true,
InstrumentType.All,
MarketDataType.All,
OrderEventType.All);
When a trader assigns a physical instrument (like NIFTY Futures or RELIANCE Equity) to this IVObject, BlitzTrader automatically handles:
• Order management
• Market price updates
• Trade statistics
• Position tracking
You write your strategy once. It works on any market, any instrument.
IVInfo - Your Gateway to Market Data and Positions
Once you have an IVObject, you bind it to an IVInfo helper class. This gives you easy access to all market data, instrument details, and position statistics.
csharp
IVInfo _ivInfoInstrument;
protected override void OnInitialize()
{
_ivInfoInstrument = base.GetIVInfo(_ivInstrument);
}
Access Market Data
csharp
if (_ivInfoInstrument.MarketDataContainer.LastPrice < 0)
return;
Access Instrument Information
csharp
double lotSize = ivInfoInstrument.LotSize;
Access Position Statistics
csharp
if (ivInfoInstrument.Statistics.NetPosition != 0)
{
orderCommandEx.UserText = "Closing position";
orderCommandEx.GoFlat();
}
Order Execution: Powerful Yet Simple
BlitzTrader provides two levels of order execution control.
IOrderCommandEx: High-Level Execution Primitives
Use this for advanced execution strategies with minimal code.
csharp
callOrderCommandEx.SetIgnoreRefLimitPriceFlag(true);
callOrderCommandEx.UserText = "ExecuteStraddle";
callOrderCommandEx.EnterShort(0);
IOrderCommand: Fine-Grained Order Control
Use this when you need precise control over order price, quantity, and type.
csharp
int orderQuantity = _orderTotalQuantity - _filledOrderQuantity;
double orderPrice = _orderCommand.IVInfo.MarketDataContainer.BestBidPrice + 0.05;
// Send New, Modify, or Cancel orders
_orderCommand.Set(true, _orderSide, OrderType.Limit, orderQuantity, orderPrice, 0);
Technical Analysis Library: Built-in Indicators
BlitzTrader comes with a powerful technical analysis library.
Working with Time Series Data
Create a candlestick time series and listen for bar completion events.
csharp
TimeDataSeries tds = TimeDataSeries.GetMinutesBarCompression(60);
tds.OnBarDataCompletedEvent += TDS_OnBarDataCompletedEvent;
Using Indicators
Declare an indicator and bind it to your time series. BlitzTrader comes with over 100+ built-in indicators and also provides a framework to develop and use your own proprietary indicators.
csharp
IndicatorBase stIndicator = IndicatorRegistrationManager.Instance.GetIndicator("SuperTrend", tds);
stIndicator.SetFieldValue("LengthPeriod", 10);
stIndicator.SetFieldValue("Multiplier", 1);
Processing Bar Completion Events
csharp
private void TDS_OnBarDataCompletedEvent(Guid id, IBarData barData, int currentBarIndex)
{
double currentBarClose = barData.Close;
double previousBarClose = tds[currentBarIndex - 1];
double stCurrent = stIndicator[currentBarIndex];
double stPrev = stIndicator[currentBarIndex - 1];
// Your trading logic here
}
Test Before You Deploy: Simulated Environment
Before going live, you can debug and test your strategy in a simulated environment. This ensures:
• Your logic works as expected
• No hidden bugs or errors
• Your risk controls function correctly
• Performance meets your requirements
Only when you are fully confident do you deploy to production.
Market Agnostic: Write Once, Run Anywhere
One of the most powerful features of BlitzTrader is that your strategy is market agnostic.
• Write your strategy once
• Deploy it on equities, derivatives, commodities, or forex
• Run it on any exchange, any instrument
• No code changes required
This means your intellectual property—your alpha—is portable across markets and asset classes.
Summary: The BlitzTrader Advantage
| Traditional Approach | BlitzTrader Approach |
|---|---|
| Months of development | Days to deployment |
| Millions in infrastructure cost | Fraction of the cost |
| Focus on system building | Focus on alpha generation |
| Complex maintenance | Blitz handles the engine |
| Market-specific code | Write once, run anywhere |
| Python (slower, interpreted) | C# (fast, compiled) |
BlitzTrader gives you a production-ready, institutional-grade framework that handles everything except your trading logic.
• Simple C# class: Inherit from StrategyBase
• Easy input/output variables: Visible in trader dashboard
• Powerful IVObject abstraction: Market-agnostic instrument handling
• Rich technical analysis library: Indicators and time series
• Flexible order execution: Simple or fine-grained control
• Test before deploy: Simulated environment
• Write once, run anywhere: Any market, any instrument
You focus on your alpha. BlitzTrader handles the rest.
Ready to deploy your first strategy in days? Contact the BlitzTrader team today.