MYF Candles Dashboard

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #229871 quote
    ashehzi
    Participant
    Average

    Hi,

    I am trying to achieve the following:

    1. Main chart time frame is 1 minute
    2. I want to add an indicator (e.g. named MTF Candles Dashboard) as “New Panel” and it should be able to display
      1. last 3 5 mn candles
      2. last 3 15mn candles
      3. last 3 30mn candles
      4. last 3 1h candles

    If I e.g. do the following code as an example, it surely is wrong I know.

    
    TIMEFRAME(5mn, UPDATEONCLOSE)
    
    if open > close then
    DRAWCANDLE(open, high, low, close) coloured (255,0,0)
    else
    DRAWCANDLE(open, high, low, close) coloured (0,255,0)
    endif
    TIMEFRAME(DEFAULT)
    
    
    TIMEFRAME(10mn, UPDATEONCLOSE)
    
    if open > close then
    DRAWCANDLE(open, high, low, close) coloured (255,0,0)
    else
    DRAWCANDLE(open, high, low, close) coloured (0,255,0)
    endif
    TIMEFRAME(DEFAULT)
    
    TIMEFRAME(15mn, UPDATEONCLOSE)
    
    if open > close then
    DRAWCANDLE(open, high, low, close) coloured (255,0,0)
    else
    DRAWCANDLE(open, high, low, close) coloured (0,255,0)
    endif
    TIMEFRAME(DEFAULT)
    
    TIMEFRAME(30mn, UPDATEONCLOSE)
    
    if open > close then
    DRAWCANDLE(open, high, low, close) coloured (255,0,0)
    else
    DRAWCANDLE(open, high, low, close) coloured (0,255,0)
    endif
    TIMEFRAME(DEFAULT)
    
    TIMEFRAME(1h, UPDATEONCLOSE)
    
    if open > close then
    DRAWCANDLE(open, high, low, close) coloured (255,0,0)
    else
    DRAWCANDLE(open, high, low, close) coloured (0,255,0)
    endif
    TIMEFRAME(DEFAULT)
    
    RETURN

    Attached picture is wrong indeed as it is not what is intended. I need to start modifying it. Please don’t tell me that it is only possible through drawRectange and drawSegment.

    Thanks

    Ash

    MTF_Candles.png MTF_Candles.png
    #229873 quote
    robertogozzi
    Moderator
    Master

    Can you show how and where they should be plotted?

    #229892 quote
    ashehzi
    Participant
    Average

    The whole yellow area in the attachment is just one indicator. I want to make 4 or 5 portions in it like

    1. last 3 5min candles
    2. last 3 10min candles
    3. last 3 15min candles
    4. last 3 30min candles

    We can customise the interval which should not an issue but what is the simple way to construct last 3 candles of multiple timeframes within same one indicator as shown in the attachment.

    MainChart_with_Indi_InYellow.png MainChart_with_Indi_InYellow.png
    #229896 quote
    druby
    Participant
    New

    hi…  Something like this!

    Razz and ashehzi thanked this post
    dontwalk-last3-candles-1.png dontwalk-last3-candles-1.png
    #229899 quote
    Razz
    Participant
    Master

    Hello Druby, that looks very good, I didn’t know such a thing was possible. Did you write the code yourself?

    #229901 quote
    druby
    Participant
    New

    Hi Razz

    Yes , did it this morning after seeing #don’t_walk’s  post. Been learning the programming side, but keep hitting various limitations.

    Over time, looking at other problems, sometimes help identify problems and shed some light on various things and work around solutions.

    This , in this form relies on the use of array’s and anchor’ed graphic’s, introduced in version 11.

    See what you think, appears stable, only works on 1 minute time frame chart.

    Import the code from below

    Regards druby

    ashehzi and Razz thanked this post
    last-3-TF-candles-V1.00.itf
    #229907 quote
    ashehzi
    Participant
    Average

    Thanks a lot druby. That is what I was looking for. I will download and give it a try. I was looking for short term context but from different time frames without looking at multiple charts. Thanks again.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

MYF Candles Dashboard


Platform Support: Charts, Data & Broker Setup

New Reply
Author
author-avatar
ashehzi @ashehzi Participant
Summary

This topic contains 6 replies,
has 4 voices, and was last updated by ashehzi
1 year, 11 months ago.

Topic Details
Forum: Platform Support: Charts, Data & Broker Setup
Language: English
Started: 03/15/2024
Status: Active
Attachments: 4 files
Logo Logo
Loading...