SMT for Dax correlation EU Stocks

Forums ProRealTime English forum ProBuilder support SMT for Dax correlation EU Stocks

Viewing 1 post (of 1 total)
  • #249114

    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 < lowest[1](low, lookback) swingHighSX5E = priceSX5E = highest[1](priceSX5E, lookback) AND priceSX5E > 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

Viewing 1 post (of 1 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login