Draw a Segment between arrows

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #170264 quote
    InertiaInertia
    Participant
    Master

    Hi all !

    I am confuse how to draw a coloured segment between the arrows…The code line iis at the bottom

    Thank you for your help šŸ˜‰

     

    // The following code is related to this timescale:10 minutes
    MySMA20m = Average[20](close)
    MySMA10m = Average[10](close)
    
    c1 = (MySMA10m crosses over MySMA20m)
    
    c2 = (MySMA10m crosses under MySMA20m)
    
    Signalachat = c1
    Signalvente = c2
    
    If Signalachat then
    PrixACHAT = Low
    DRAWARROWUP(barindex,low-0)coloured(0,0,0)
    endif
    
    if Signalvente then
    PrixVENTE = high
    DRAWARROWDOWN(barindex,high+0) coloured(0,0,0)
    endif
    
    return PrixACHAT as "Signalachat", PrixVENTE as "Signalvente"
    
    //Hereafter is the code line to insert but How??
    //DRAWSEGMENT (barindex, close, barindex[5], close[5])
    #170271 quote
    InertiaInertia
    Participant
    Master

    If I may add, I wish to have the segment also from the last “arrow” til the “currentbar”Ā  that would be awesome !

    Big Thanks to the community šŸ˜‰

    #170294 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    There you go:

    // The following code is related to this timescale:10 minutes
    MySMA20m = Average[20](close)
    MySMA10m = Average[10](close)
     
    c1 = (MySMA10m crosses over MySMA20m)
     
    c2 = (MySMA10m crosses under MySMA20m)
     
    Signalachat = c1
    Signalvente = c2
     
    If Signalachat then
       PrixACHAT = Low
       DRAWARROWUP(barindex,low-0)coloured(0,0,0)
       Bar1 = BarIndex
    endif
     
    if Signalvente then
       PrixVENTE = high
       DRAWARROWDOWN(barindex,high+0) coloured(0,0,0)
       Bar2 = BarIndex
    endif
    DRAWSEGMENT(Bar1,PrixACHAT,Bar2,PrixVENTE) coloured(0,255,0,255) STYLE(line,2)
    return PrixACHAT as "Signalachat", PrixVENTE as "Signalvente"
     
    //Hereafter is the code line to insert but How??
    //DRAWSEGMENT (barindex, close, barindex[5], close[5])
    Inertia thanked this post
    #170393 quote
    InertiaInertia
    Participant
    Master

    You are exceptionnel Roberto !

    Grazie Ć  Lei.

Viewing 4 posts - 1 through 4 (of 4 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

Draw a Segment between arrows


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Inertia @inertia Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by InertiaInertia
5 years, 4 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 05/24/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...