New Feature on AlgoBuilderX: On Position Event

Alessandro Avatar

In February 2025, we introduced a new feature that significantly expands the possibilities for creating automated trading strategies in AlgoBuilderX: the On Position event.

This feature, located in the Event Selection section at the top left of the builder, is based on the activation of two

specific blocks: Trade Event and Order Event.

The On Position event is particularly useful in situations where a trigger is needed in response to changes in an active trade or a pending order. This includes events such as:

  • Opening or closing of a trade
  • Modification of an existing position
  • Cancellation of a pending order

This new feature joins the list of events already available in AlgoBuilderX – such as OnTick, OnBar, etc. – and completes the logical framework available to traders, enabling the creation of more structured, responsive, and optimized strategies.

If you’d like to learn more about the existing events in AlgoBuilderX, check out this video: Understanding Events

What is the On Position event?

The On Position event allows you to trigger a strategy only when specific trading-related events occur. The bot reacts in real time to changes in open positions or pending orders, enabling the development of more intelligent and responsive automated systems.

To support this feature, AlgoBuilderX includes two dedicated blocks:

  • Trade Event
  • Order Event

Trade Event: Reacting to trade activity

The Trade Event block lets you define actions in response to trade-related events. Available options include:

  • Trade Created: triggers when a new trade is opened
  • Trade Modified: triggers when an existing trade is modified (e.g., stop loss, take profit, volume)
  • Trade Closed: triggers when a trade is closed, with the option to specify the reason

Note: This block must be placed at the beginning of the sequence to ensure correct execution of the strategy.

Example – Dynamic Take Profit Based on RSI

You can use the Trade Created block to dynamically set the Take Profit (TP) based on the Relative Strength Index (RSI) at the moment the trade is opened:

  • If RSI > 70 → set TP to 20 pips
  • If RSI < 30 → set TP to 10 pips

This approach allows the strategy to adapt exit conditions to current market behavior, potentially improving profitability.


Order Event: Managing pending orders dynamically

The Order Event block enables intelligent, real-time management of pending orders, allowing the strategy to respond to specific order-related events:

  • Order Created: triggers when a new pending order is placed
  • Order Canceled: triggers when a pending order is canceled, with the option to specify the cancellation reason

Note: Like the Trade Event block, this must be placed at the beginning of the sequence.

Example – Automatic Logging of Canceled Orders

Using the Order Canceled block, it’s possible to automatically log each cancellation, including details such as:

  • Order type
  • Direction (buy/sell)
  • Reason for cancellation

This improves order tracking and helps fine-tune strategy logic by analyzing order behavior.


With the introduction of the On Position event, it is now possible to build trading strategies that are more precise, flexible, and intelligent, tailored to your specific operational needs.

To explore all the new features introduced in February, visit the full article on our website: Monthly Highlights – February 2025

Latest News, Articles and Tutorials