Conversion de Market Shift Level

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #252537 quote
    GigiGigi
    Participant
    Senior

    Bonjour,

    pourriez vous convertir cet indicateur de Tradingview (Market Shift Levels)? Par avance, merci.

    MARKET-SHIFT-TRADINGVIEW.docx
    #252600 quote
    Iván GonzálezIván González
    Moderator
    Legend

    voici:

    //--------------------------------------------------//
    // PRC_Market Shift Levels by ChartPrime
    // version = 1.0
    // 14.10.2025
    // Adapted by: Iván González @ www.prorealcode.com
    // Sharing ProRealTime knowledge
    //--------------------------------------------------//
    // --- USER INPUTS ---
    length = 55
    // Label Data: 1=Volume, 0=Price
    lblData = 1
    // --- INDICATOR CALCULATIONS ---
    hma1 = hullaverage[length](close)
    hma2 = hma1[5]
    atr=averagetruerange[14](close)
    // Initialize and update the level at crossovers
    ONCE level = 0.0
    IF hma1 CROSSES OVER hma2 THEN
       level = low
    ENDIF
    IF hma1 CROSSES UNDER hma2 THEN
       level = high
    ENDIF
    
    // --- VISUALIZATION ---
    // Draw the Market Shift Level line
    // We only draw if the level is the same as the previous bar to create steps
    c = UNDEFINED
    IF level = level[1] THEN
       c = level
    ENDIF
    
    // Possible Reversals Signals
    // Bearish reversal signal (price touches the level from below and is rejected)
    isBearishReversal = high[2] < level AND high < level AND high[1] > level
    IF isBearishReversal THEN
       volSum = volume[2] + volume[1] + volume[0]
       IF lblData = 1 THEN
          DRAWTEXT(volSum, barindex[1], high[1]+atr) COLOURED(225,43,43)
       ELSE
          DRAWTEXT(ROUND(high[1]*100)/100, barindex[1], high[1]+atr) COLOURED(225,43,43)
       ENDIF
       DRAWARROWDOWN(barindex[1], high[1] + atr*0.1) COLOURED(225,43,43)
    ENDIF
    
    // Bullish reversal signal (price touches the level from above and is rejected)
    isBullishReversal = low[2] > level AND low[1] < level AND low > level
    IF isBullishReversal THEN
       volSum = volume[2] + volume[1] + volume[0]
       IF lblData = 1 THEN
          DRAWTEXT(volSum, barindex[1], low[1]-atr) COLOURED(36,213,128)
       ELSE
          DRAWTEXT(ROUND(low[1]*100)/100, barindex[1], low[1]-atr)  COLOURED(36,213,128)
       ENDIF
       DRAWARROWUP(barindex[1], low[1] - (atr*0.1)) COLOURED(36,213,128)
    ENDIF
    
    RETURN c as "Market Shift Level" style(point)
    
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Conversion de Market Shift Level


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Gigi @gigi Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Iván GonzálezIván González
11 months, 1 week ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 10/13/2025
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...