Indicator: MTF trend dashboard with 200 SMA

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #258011 quote
    oyinloyeaoyinloyea
    Participant
    Veteran

    I want to create a Dashboard . I have started coding but I am stuck. Attached is the code

    //--------------------------------------------------------------//
    // INDICATOR: MTF_Trend_Dashboard
    // Inspired by BKTrend SMA/EMA Meter
    //--------------------------------------------------------------//
    
    // 1. DATA COLLECTION FROM MULTIPLE TIMEFRAMES
    // Timeframe 1: 5 Minutes
    TIMEFRAME(5 minutes)
    sma5M = Average[200](close)
    cond5M = close > sma5M
    
    // Timeframe 2: 15 Minutes
    TIMEFRAME(15 minutes)
    sma15M = Average[200](close)
    cond15M = close > sma15M
    
    // Timeframe 3: 1 Hour
    TIMEFRAME(1 hour)
    sma1H = Average[200](close)
    cond1H = close > sma1H
    
    // Timeframe 4: 4 Hours
    TIMEFRAME(4 hours)
    sma4H = Average[200](close)
    cond4H = close > sma4H
    
    // Timeframe 5: Daily
    TIMEFRAME(daily)
    sma1D = Average[200](close)
    cond1D = close > sma1D
    
    // 2. DASHBOARD RENDERING (Only on the last bar)
    IF IsLastBarUpdate THEN
    // Table Headers
    DRAWTEXT(" 5M | 15M | 1H | 4H | 1D ", 20, 30, SansSerif, Bold, 12) COLOURED(255,255,255)
       
    // Status Indicators (Row 1: Price vs 200 SMA)
    // 5M
    IF cond5M THEN
    DRAWTEXT(" BULL ", 22, 15, SansSerif, Bold, 10) COLOURED(0,255,0)
    ELSE
    DRAWTEXT(" BEAR ", 22, 15, SansSerif, Bold, 10) COLOURED(255,0,0)
    ENDIF
       
    // 15M
    IF cond15M THEN
    DRAWTEXT(" BULL ", 45, 15, SansSerif, Bold, 10) COLOURED(0,255,0)
    ELSE
    DRAWTEXT(" BEAR ", 45, 15, SansSerif, Bold, 10) COLOURED(255,0,0)
    ENDIF
    
    // 1H
    IF cond1H THEN
    DRAWTEXT(" BULL ", 68, 15, SansSerif, Bold, 10) COLOURED(0,255,0)
    ELSE
    DRAWTEXT(" BEAR ", 68, 15, SansSerif, Bold, 10) COLOURED(255,0,0)
    ENDIF
    
    // 4H
    IF cond4H THEN
    DRAWTEXT(" BULL ", 91, 15, SansSerif, Bold, 10) COLOURED(0,255,0)
    ELSE
    DRAWTEXT(" BEAR ", 91, 15, SansSerif, Bold, 10) COLOURED(255,0,0)
    ENDIF
    
    // 1D
    IF cond1D THEN
    DRAWTEXT(" BULL ", 114, 15, SansSerif, Bold, 10) COLOURED(0,255,0)
    ELSE
    DRAWTEXT(" BEAR ", 114, 15, SansSerif, Bold, 10) COLOURED(255,0,0)
    ENDIF
    ENDIF
    
    RETURN
    

    I want it to be similar to the dashboard shown below

    #258015 quote
    Iván GonzálezIván González
    Moderator
    Legend

    image missing

    #258045 quote
    oyinloyeaoyinloyea
    Participant
    Veteran

    I can’t add a chart to the page

    #258049 quote
    oyinloyeaoyinloyea
    Participant
    Veteran

    Attached is the file

    Dashboard-1.jpg Dashboard-1.jpg
    #258075 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    There you go:

    //--------------------------------------------------------------//
    // INDICATOR: MTF_Trend_Dashboard
    // Inspired by BKTrend SMA/EMA Meter
    //--------------------------------------------------------------//
    DEFPARAM DrawOnLastBarOnly = true
    // 1. DATA COLLECTION FROM MULTIPLE TIMEFRAMES
    // Timeframe 1: 5 Minutes
    TIMEFRAME(5 minutes)
    sma5M = Average[200](close)
    cond5M = close > sma5M
    
    // Timeframe 2: 15 Minutes
    TIMEFRAME(15 minutes)
    sma15M = Average[200](close)
    cond15M = close > sma15M
    
    // Timeframe 3: 1 Hour
    TIMEFRAME(1 hour)
    sma1H = Average[200](close)
    cond1H = close > sma1H
    
    // Timeframe 4: 4 Hours
    TIMEFRAME(4 hours)
    sma4H = Average[200](close)
    cond4H = close > sma4H
    
    // Timeframe 5: Daily
    TIMEFRAME(daily)
    sma1D = Average[200](close)
    cond1D = close > sma1D
    
    Timeframe(default)
    // 2. DASHBOARD RENDERING (Only on the last bar)
    IF IsLastBarUpdate THEN
    // Table Headers
    //--------------------------------------------------------------------------------------------------------------------
    drawrectangle(-250,0,-10,-40)                                                 anchor(TopRight) coloured("LightGray") bordercolor("Black")
    drawtext ("    5M    |    15M    |    1H    |    4H    |    1D    ", -130,-10, SansSerif, Bold, 12) anchor(TopRight) coloured("Black")
    //--------------------------------------------------------------------------------------------------------------------
    // Status Indicators (Row 1: Price vs 200 SMA)
    // 5M
    IF cond5M THEN
    DRAWTEXT(" BULL ", -215, -25, SansSerif, Bold, 10) anchor(TopRight) coloured("Green")
    ELSIF Not cond5M THEN
    DRAWTEXT(" BEAR ", -215, -25, SansSerif, Bold, 10) anchor(TopRight) coloured("Red")
    ENDIF
    //   
    // 15M
    IF cond15M THEN
    DRAWTEXT(" BULL ", -170, -25, SansSerif, Bold, 10) anchor(TopRight) coloured("Green")
    ELSIF Not cond15M THEN
    DRAWTEXT(" BEAR ", -170, -25, SansSerif, Bold, 10) anchor(TopRight) coloured("Red")
    ENDIF
    //
    // 1H
    IF cond1H THEN
    DRAWTEXT(" BULL ", -125, -25, SansSerif, Bold, 10) anchor(TopRight) coloured("Green")
    ELSIF Not cond1H THEN
    DRAWTEXT(" BEAR ", -125, -25, SansSerif, Bold, 10) anchor(TopRight) coloured("Red")
    ENDIF
    //
    // 4H
    IF cond4H THEN
    DRAWTEXT(" BULL ", -80, -25,  SansSerif, Bold, 10) anchor(TopRight) coloured("Green")
    ELSIF Not cond4H THEN
    DRAWTEXT(" BEAR ", -80, -25,  SansSerif, Bold, 10) anchor(TopRight) coloured("Red")
    ENDIF
    //
    // 1D
    IF cond1D THEN
    DRAWTEXT(" BULL ", -35, -25,  SansSerif, Bold, 10) anchor(TopRight) coloured("Green")
    ELSIF Not cond1D THEN
    DRAWTEXT(" BEAR ", -35, -25,  SansSerif, Bold, 10) anchor(TopRight) coloured("Red")
    ENDIF
    ENDIF
    RETURN
    
    


    Nicolas, danskfilou and Iván González thanked this post
    x-1.jpg x-1.jpg DashBoard.itf
Viewing 5 posts - 1 through 5 (of 5 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

Indicator: MTF trend dashboard with 200 SMA


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
oyinloyea @oyinloyea Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by robertogozzirobertogozzi
8 months, 1 week ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 02/13/2026
Status: Active
Attachments: 3 files
ProRealCode ProRealCode
Loading...