Core Scripting - TWM Core and Custom Indicators

Introduction

This lesson is available with subscription.

Ecosystem Access

Included with a TWM subscription

  • Available as part of the TWM ecosystem
  • Access remains active while your TWM subscription is active
  • No separate purchase required for this course
This course is available inside the TWM platform.

Code Structure

This lesson is available with subscription.

Ecosystem Access

Included with a TWM subscription

  • Available as part of the TWM ecosystem
  • Access remains active while your TWM subscription is active
  • No separate purchase required for this course
This course is available inside the TWM platform.

Execution

This lesson is available with subscription.

Ecosystem Access

Included with a TWM subscription

  • Available as part of the TWM ecosystem
  • Access remains active while your TWM subscription is active
  • No separate purchase required for this course
This course is available inside the TWM platform.

Parameters

This lesson is available with subscription.

Ecosystem Access

Included with a TWM subscription

  • Available as part of the TWM ecosystem
  • Access remains active while your TWM subscription is active
  • No separate purchase required for this course
This course is available inside the TWM platform.

Plots & Series

This lesson is available with subscription.

Ecosystem Access

Included with a TWM subscription

  • Available as part of the TWM ecosystem
  • Access remains active while your TWM subscription is active
  • No separate purchase required for this course
This course is available inside the TWM platform.

Miscellaneous

This lesson is available with subscription.

Ecosystem Access

Included with a TWM subscription

  • Available as part of the TWM ecosystem
  • Access remains active while your TWM subscription is active
  • No separate purchase required for this course
This course is available inside the TWM platform.
Build Ichimoku Cloud From Scratch

Free preview available

Create a free account to watch the preview lessons. No purchase required.

TWM

Courses


COURSES

Core Scripting

TWM Core and Building Custom Indicators: From Zero to Confident

Courses

This course is dedicated to the TWM Core and the complete foundation of custom indicator development. It is designed for users who want to move beyond basic usage and into real development within the TWM platform. You will learn not only how to build indicators, but how the underlying TWM API works, how execution flows through the system, and how all components interact in a real environment.

This course is intentionally positioned as the required step before moving into strategy development. Many of the concepts taught here apply to everything you will build in TWM — not just indicators. You will work with execution states, parameters, Series, plots, import/export workflow, debugging, and the internal lifecycle that every professional TWM tool relies on.

By the end of the course, you will have a reusable indicator template, a clear understanding of the TWM Core API, and the technical confidence to continue into advanced courses focused on automated strategies and full system development.

Description

This course provides a complete technical foundation for building custom indicators and understanding the TWM Core API. Although the examples are focused on indicator development, the knowledge gained here applies to all custom development within the TWM platform, including strategies, tools, and extensions.

🔹 1. Code Structure & Reusable Indicator Template

You will learn how to properly structure an indicator from top to bottom using a standard, reusable architecture:

  1. Private fields organization
  2. Indicator name and version handling
  3. Parameters, enums, and internal values
  4. OnStateChange lifecycle and initialization logic
  5. OnBarUpdate execution logic and core business flow
  6. Custom rendering and visual logic

By the end of this module, you will have a universal indicator template that can be reused for most of your future TWM custom projects.

You will also learn what each section of the code is responsible for and why the order of structure matters for stability and performance.

🔹 2. GUID System & Import / Export Architecture

This section explains the internal referencing and portability system of TWM:

  1. What a GUID is and how it is used in TWM
  2. How to reference other indicators using reference GUID arrays
  3. How nested indicators are handled during import and export
  4. The full TWM import/export safety workflow:
  5. Compile before export
  6. Export operation
  7. Compile before import
  8. Automatic rollback on failed import
  9. How incorrect references break portability
  10. Rules for correct import/export:
  11. Class name must match file name
  12. Namespace must match folder structure

You will also test and validate this behavior in real scenarios to ensure your indicators remain fully portable across systems.

🔹 3. Execution Model & Runtime Behavior

You will gain a precise understanding of how indicators execute inside the TWM engine:

  1. OnBarUpdate execution logic
  2. OnStateChange stages with focus on:
  3. State.Defaults
  4. State.Configured
  5. How default values are defined and how user overrides work
  6. How input series are selected and processed
  7. How to attach Visual Studio to TWM for debugging
  8. How to use breakpoints and inspect runtime behavior

You will also learn:

  1. Why indicators should be created globally and not inside OnBarUpdate
  2. Why calling EMA(100)[0] directly inside execution is inefficient
  3. How and why global variables must be reset between initializations

🔹 4. Working with Input, Series & Embedded Indicators

This module teaches how to properly work with calculated values and indicator chaining:

  1. Understanding what Input represents
  2. How to input one indicator into another via the UI
  3. How to create and manage custom Series
  4. How to calculate internal values such as:
  5. (Low[0] + High[0]) / 2
  6. How to pass calculated Series into built-in indicators
  7. How to use the output of embedded indicators for your own plots

This section forms the technical basis for combining multiple indicators into a single system.

🔹 5. Parameters & Auto-Generated Code

You will learn how the parameter system works internally:

  1. Defining indicator parameters
  2. Category grouping and display order
  3. How TWM auto-generates code during compilation
  4. How strategies initialize indicators using the generated code
  5. Understanding how parameters propagate from UI to runtime

You will also work with the custom DateTime type converter used in modern TWM strategies.

🔹 6. Plots, Panels & Visual Output

You will gain full control over indicator visualization:

  1. What Series are and how they are displayed
  2. Main price pane vs additional indicator panes
  3. Creating and naming plots
  4. Setting plot width, type, and style
  5. Data Box integration
  6. Assigning plot values inside business logic
  7. Changing plot colors dynamically during execution
  8. Using transparent plots to pass signals into strategies
  9. Using plot transparency to hide unwanted values and prevent visual noise

🔹 7. Drawing Objects & Visual Tools

You will work with built-in TWM drawing tools:

  1. Drawing lines using:
  2. Top
  3. Bottom
  4. Left
  5. Right anchors
  6. Creating and managing text objects
  7. Using loop-based calculations for drawing repetitive logic

🔹 8. Market Data Access & Indexing

This module focuses on how to correctly access chart data:

  1. Using:
  2. Close
  3. Open
  4. High
  5. Low
  6. Time and Date indexes
  7. Understanding CurrentBar
  8. Where CurrentBar must be checked to prevent logic errors
  9. How to safely reference historical bars

You will also learn how to prevent the most common runtime errors:

  1. Index out-of-range exceptions
  2. Reading beyond available bar history
  3. Improper lookback usage

🔹 9. Multi-Panel Indicators & Visual Layer Control

You will learn how to:

  1. Use more than one additional panel
  2. Plot lines on:
  3. Price pane
  4. Indicator pane
  5. Multiple additional panes dynamically
  6. Switch plotting behavior at runtime

🔹 10. Chart & Bar Coloring

This section covers full visual styling control:

  1. Coloring the chart background:
  2. On the current bar
  3. On previous bars
  4. Coloring price bars dynamically based on logic
  5. Using colors for conditions, states, and execution feedback

Outcome of This Course

After completing Core Scripting, you will:

  1. Fully understand the TWM Core execution model
  2. Have a professional reusable indicator template
  3. Know how to:
  4. Build
  5. Debug
  6. Export
  7. Import
  8. Embed
  9. Visualize
  10. Chain indicators
  11. Be fully prepared to move into:
  12. Strategy development
  13. Automation
  14. Advanced TWM system design


Main Features

Complete TWM Core API Foundation

Learn how the TWM engine works internally, including execution flow, states, initialization, and runtime behavior used across all custom development.

Professional Reusable Indicator Template

Build a full production-ready indicator structure that you can reuse for most future custom projects.

Execution Model & Debugging Workflow

Master OnBarUpdate, OnStateChange, Visual Studio debugging, breakpoints, and runtime inspection inside TWM.

Series, Input & Indicator Chaining

Learn how to calculate custom Series, pass them into built-in indicators, and chain multiple indicators together efficiently.

Parameter System & Auto-Generated Code

Understand how parameters work, how category ordering is handled, and how TWM generates initialization code for strategies.

Plots, Panels & Visual Output Control

Full control over plots, multiple panes, dynamic colors, transparency, and Data Box integration.

Reliable Import / Export & GUID Architecture

Learn how to correctly export and import indicators with all dependencies using TWM’s GUID and reference system.

Advanced Chart & Bar Visualization Tools

Work with draw objects, text labels, background coloring, and dynamic bar coloring based on real-time logic.

FAQ

Do you have any more questions about our Course? Let's see if we already have the answer.
Please read the FAQ below.

No. While the course uses indicators as the main learning format, it focuses on the TWM Core API. Many of the concepts taught here apply to strategies, tools, and all custom development in TWM.

Basic knowledge of C# is recommended. You do not need advanced experience, but you should already understand core programming concepts like variables, methods, and loops. Please take 101 course if you have not.

Yes. Core Scripting course is the required foundation before moving into strategy development. It explains how the platform executes, initializes, and manages custom logic.

Yes. By the end of the course, you will have a reusable indicator template and the knowledge required to build, debug, and deploy your own custom indicators.

Yes. You will learn how to attach Visual Studio to TWM, use breakpoints, inspect runtime values, and prevent common execution errors.

Yes. The course explains how to create custom Series, embed indicators inside other indicators, and use their output in your own calculations and plots.

Yes. You will learn how parameters are defined, grouped, passed from the UI to runtime, and how TWM auto-generates code for indicator initialization.

Yes. The course explains the full import/export workflow, including GUID references, dependency handling, compilation checks, and rollback behavior.

Absolutely. The Core API knowledge from this course is directly applied in strategy development and automation.

Yes. This course is specifically designed for users who want full technical control over their indicators and a deep understanding of how the TWM platform operates internally.

Still have a question?

For assistance, please visit our Support page. Our dedicated team is ready
to help you 24/7.

Testimonials

Check out here what the other users have to say about this Course!

Profile Image
Michael T. — Day Trader

"“Debugging inside TWM used to be a nightmare for me. After the Visual Studio attach and execution flow lessons, everything clicked. Huge confidence boost.”"

Profile Image
Victor L. — Quant-Oriented Trader

"“This was the missing link between basic coding and real system development in TWM. After this course, moving into strategy automation felt natural, not overwhelming.”"

Profile Image
Daniel M. — Futures Trader & Developer

"“This course finally explained how TWM actually works under the hood. After 102, I stopped guessing and started building indicators with a proper structure. The Core execution part alone is worth it.”"

Profile Image
Robert S. — Software Engineer

"“What I liked most is that this is not just an indicator tutorial. It’s a full Core API breakdown. The reusable template I built during the course is now my base for every project.”"

Profile Image
Chris P. — Independent Strategy Developer

"“The import/export and GUID section saved me from breaking my projects multiple times. I finally understand how to properly package indicators with all dependencies.”"

Profile Image
Alex K. — Algorithmic Trading Enthusiast

"“I had been using indicators for years, but never really understood the lifecycle and states. This course made everything clear — especially how to chain indicators correctly using Series.”"

Similar courses

TWM users have the opportunity to create their own strategies and indicators using the C# coding language.

Necessary cookies help make the website usable by enabling basic functions such as consent storage, security protection, language preferences, authentication, and preserving the active navigation context.

  • Necessary cookies

    UserUUID

    Technical identifier used to manage and persist cookie consent preferences.

    Maximum storage duration: 12 Months | Type: Necessary cookies
    consent

    Stores your cookie consent choices and selected preferences.

    Maximum storage duration: 12 Months | Type: Necessary cookies
    site_mode

    Preserves the active navigation context, for example keeping the user in the standard website flow or the Start Trading flow when shared navigation elements are used.

    Maximum storage duration: Up to 30 Days | Type: Necessary cookies
    .AspNet.Consent

    Indicates whether the user has provided cookie consent.

    Maximum storage duration: 1 Year | Type: Necessary cookies
    .AspNetCore.Antiforgery

    Used to prevent CSRF attacks and protect form submissions and user data.

    Maximum storage duration: Session | Type: Necessary cookies
    .AspNetCore.Cookies

    Used to manage authentication information and signed-in sessions.

    Maximum storage duration: 1 Year | Type: Necessary cookies
    .AspNetCore.Culture

    Stores the user’s language and localization preferences.

    Maximum storage duration: 1 Year | Type: Necessary cookies

Functional cookies allow the website to remember preferences and support enhanced features or integrations such as Google services, maps, embedded media, or account-related personalization.

  • Functional Cookies

    LSOLH

    Used by Google to store session information and support service-related functionality.


    Maximum storage duration: Session | Type: Functional Cookies
    COMPASS

    Used by Google to remember settings and improve navigation across integrated services.

    Maximum storage duration: 6 Months | Type: Functional Cookies
    ACCOUNT_CHOOSER

    Remembers which Google accounts have been used on the device.

    Maximum storage duration: 1 Year | Type: Functional Cookies
    APISID

    Used by Google to store preferences and information when using integrated Google services such as Maps.

    Maximum storage duration: 2 Years | Type: Functional Cookies
    LSID

    Used by Google to store preferences while viewing pages that incorporate Google services.

    Maximum storage duration: 2 Years | Type: Functional Cookies
    SAPISID

    Used by Google services to support embedded content, maps, and account-related personalization.

    Maximum storage duration: 2 Years | Type: Functional Cookies
    __Host-GAPS

    Used by Google to support service preferences and related functionality on pages integrating Google services.

    Maximum storage duration: 2 Years | Type: Functional Cookies

Statistical cookies help us understand how visitors interact with the site, measure traffic, and improve services. Data is processed in aggregated or pseudonymized form by providers such as Google and Yandex.

  • Statistical Cookies

    _ga, _ga_*

    Google Analytics cookies used to distinguish users and sessions for traffic measurement and site usage analysis.


    Maximum storage duration: 2 Years | Type: Statistical Cookies
    _gid

    Google Analytics cookie used to distinguish users within a single day session.

    Maximum storage duration: 24 Hours | Type: Statistical Cookies
    _ym_uid

    Yandex Metrica unique visitor identifier used to distinguish users across sessions.

    Maximum storage duration: 1 Year | Type: Statistical Cookies
    _ym_d

    Yandex Metrica cookie that stores the date of the user's first visit.

    Maximum storage duration: 1 Year | Type: Statistical Cookies
    _ym_isad

    Yandex Metrica cookie used to detect whether the user has an ad blocker enabled.

    Maximum storage duration: 2 Days | Type: Statistical Cookies
    _ym_visorc

    Yandex Metrica Webvisor cookie used to record and replay user sessions for usability analysis.

    Maximum storage duration: 30 Minutes | Type: Statistical Cookies

Marketing cookies are used for advertising, campaign attribution, conversion tracking, personalization, and cross-platform measurement by providers such as Google, Microsoft, Meta, and TikTok.

  • Marketing Cookies

    AID

    Used by Google to link activity across devices and improve ad attribution.


    Maximum storage duration: 1 Year | Type: Marketing Cookies
    ANONCHK

    Used by Microsoft Advertising to validate and support ad-related requests.

    Maximum storage duration: 10 Minutes | Type: Marketing Cookies
    MUID

    Microsoft advertising identifier used to recognize browsers across Microsoft domains.

    Maximum storage duration: 13 Months | Type: Marketing Cookies
    __Secure-3PSID, __Secure-3PAPISID, __Secure-3PSIDTS, __Secure-3PSIDCC

    Google advertising and personalization cookies used to build preference profiles and support ad delivery.

    Maximum storage duration: 2 Years | Type: Marketing Cookies
    ADS_VISITOR_ID

    Used by Google to identify visitors for advertising and attribution purposes.

    Maximum storage duration: 2 Years | Type: Marketing Cookies
    OTZ

    Used by Google to support ad personalization and service optimization.

    Maximum storage duration: 1 Month | Type: Marketing Cookies
    __Secure-1PAPISID, __Secure-1PSID

    Google cookies used to support more relevant ads and account-related ad security.

    Maximum storage duration: 2 Years | Type: Marketing Cookies
    IDE, DSID, FLC

    DoubleClick / Google Ads cookies used for campaign attribution, ad delivery, and remarketing.

    Maximum storage duration: Varies by cookie | Type: Marketing Cookies
    datr, fr, sb, xs

    Meta / Facebook cookies used for browser recognition, security, ad measurement, and personalization across Meta services and partner sites.

    Maximum storage duration: Varies by cookie | Type: Marketing Cookies
    ttcsid

    TikTok identifier used for session-level event attribution, conversion tracking, and advertising measurement.

    Maximum storage duration: Varies by configuration | Type: Marketing Cookies
    ttcsid_D5GFV53C77U3VC0C2T50

    TikTok pixel-specific session cookie used for conversion attribution and advertising performance reporting.

    Maximum storage duration: Varies by configuration | Type: Marketing Cookies
    odin_tt

    TikTok cookie used for campaign attribution, browser recognition, and advertising performance measurement.

    Maximum storage duration: Varies by cookie | Type: Marketing Cookies
    tt_chain_token

    TikTok cookie used for event attribution and campaign linkage across sessions.

    Maximum storage duration: Varies by cookie | Type: Marketing Cookies
    ttwid

    TikTok browser identifier used for attribution, advertising measurement, and remarketing support.

    Maximum storage duration: Varies by cookie | Type: Marketing Cookies
    NID, UULE

    Google cookies that may support ad personalization, localization, and service preference handling depending on the integration and browser state.

    Maximum storage duration: Varies by cookie | Type: Marketing Cookies
    SEARCH_SAMESITE

    Google cookie used to support secure cookie handling across requests and service interactions.

    Maximum storage duration: 6 Months | Type: Marketing Cookies
About cookies and consent

This website uses cookies and similar technologies to ensure its proper functioning and, with your consent, to support functionality, measure usage, improve performance, and provide advertising, attribution, or personalized content. The legal basis for the use of necessary cookies is the legitimate interest of the data controller (Art. 6(1)(f) GDPR), while functional, statistical, and marketing cookies are used only upon your explicit consent (Art. 6(1)(a) GDPR).

Cookies are small text files stored on your device to make the website work efficiently and improve your experience. Some cookies are placed directly by us, while others may be set by third-party services integrated into our pages.

Cookie categories
  • Necessary cookies: enable core site functionality such as consent storage, navigation context, language selection, authentication, and access to secure areas. These cannot be disabled.
  • Functional cookies: allow the website to remember settings and support integrations such as embedded or third-party services.
  • Statistical cookies: collect usage and performance data to help understand and improve the site.
  • Marketing cookies: support advertising, campaign attribution, personalization, and remarketing across providers and services.
Storage and consent management

Your cookie preferences are stored locally in a cookie named consent, valid for 12 months, and pseudonymously on our systems using a technical identifier (UserUUID), which does not allow direct identification of the user. A technical cookie named site_mode may also be used to preserve the current navigation context across pages. You may change or withdraw your consent at any time via the cookie settings button visible at the bottom left of the site.

Third-party cookies

Some cookies are provided by third-party services such as Google, Microsoft, Meta, TikTok, and Yandex. These third parties may act as independent controllers for the data collected through their own technologies and services.

Your rights

You can withdraw or modify your consent at any time, delete cookies through your browser settings, and exercise your rights under Articles 15–22 GDPR (access, rectification, deletion, limitation, opposition, portability) by contacting us via the details provided in the Privacy Policy.

This Cookie Policy is aligned with Regulation (EU) 2016/679 (GDPR) and the ePrivacy Directive.