Announcement

Collapse
No announcement yet.

Dots

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dots

    Hi,

    Can anyone help me to put big dots in for the data points instead of a line please?

    code below...

    Kind regards

    Natalie


    function preMain() {
    setPriceStudy(true);


    }


    function main()
    {

    var vProjection
    var vProjection1
    var vProjection2



    vProjection1 = ((high(-2)+low(-2))/2);
    vProjection2 = ((high(-4)+low(-4))/2);
    vProjection = vProjection1+((vProjection1-vProjection2));

    return vProjection;

    }

  • #2
    Natalie
    The enclosed revision should do it
    Alex

    PHP Code:
    function preMain() {
        
    setPriceStudy(true);
        
    setPlotType(PLOTTYPE_DOT);
        
    setDefaultBarThickness(2);
        

    }
        
        
    function 
    main()
    {

    var 
    vProjection
    var vProjection1
    var vProjection2



    vProjection1 
    = ((high(-2)+low(-2))/2);
    vProjection2 = ((high(-4)+low(-4))/2);
    vProjection vProjection1+((vProjection1-vProjection2));

    return 
    vProjection;


    Comment


    • #3
      Hi Alex,

      Many thanks indeed. I knew it was something as simple as that, but I couldn't find the answer for looking.

      My next question is -

      is there anyway that the dots can be placed on the cahrt in relative positions to bars that havn't yet started or is the currect bar the furthest to the right that anything can be placed. It would be useful, (since these values calculate in advance) to have them already on the chart to the right of the current action.

      Kind regards and thank you again Alex

      Natalie

      Comment


      • #4
        Natalie
        You cannot plot a returned data point beyond the last bar.
        However you could do it using the drawShape and/or drawText functions.
        Alex

        Comment


        • #5
          Thanks Alex

          Comment

          Working...
          X