SMT for Dax correlation EU Stocks

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #249114 quote
    Josipa97
    Participant
    Junior

    I asked Chat GBT and it created something which has some errors. Here is the Code:

    //==============================
    // SMT Divergence: DAX vs SX5E
    // Built for ProRealTime
    //==============================

    indicator(“SMT Divergence DAX vs SX5E”, overlay)

    // — SETTINGS —
    lookback = 10 // swing high/low length
    symbolSX5E$ = “SX5E” // Adjust if your data uses another symbol like “EUSTX50”

    // — SX5E price fetch —
    priceSX5E = close(symbolSX5E$)

    // — Swing High / Low Detection —
    swingHighDAX = high = highest[1](high, lookback) AND high > highest[1](high, lookback)
    swingLowDAX = low = lowest[1](low, lookback) AND low highest[1](priceSX5E, lookback)
    swingLowSX5E = priceSX5E = lowest[1](priceSX5E, lookback) AND priceSX5E < lowest[1](priceSX5E, lookback)

    // — SMT Conditions —
    bullishSMT = swingLowDAX AND NOT swingLowSX5E
    bearishSMT = swingHighDAX AND NOT swingHighSX5E

    // — Plot —
    if bullishSMT then
    drawtext("🔵 SMT Bullish", barindex, low – AverageTrueRange[14], dialog, bold, 0, 255, 0)
    drawarrowup(barindex, low – AverageTrueRange[14]*0.5, 0, 255, 0)
    endif

    if bearishSMT then
    drawtext("🔴 SMT Bearish", barindex, high + AverageTrueRange[14], dialog, bold, 255, 0, 0)
    drawarrowdown(barindex, high + AverageTrueRange[14]*0.5, 255, 0, 0)
    endif

    would really apprechiate if someone would create one.

    thank you in advance,

    Josipa

    #249136 quote
    robertogozzi
    Moderator
    Master

    It looks like a pseudo code, not using the ProRealTime language.

    ProRealTime does not support the CHAR data type, among other differences.

    Iván González thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

SMT for Dax correlation EU Stocks


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Josipa97 @josipa97 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
9 months, 2 weeks ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 07/26/2025
Status: Active
Attachments: No files
Logo Logo
Loading...