Announcement

Collapse
No announcement yet.

Signal dots floating above and below price bar

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

  • Signal dots floating above and below price bar

    I have a formula that gives trade signals indicated by a blue dot below the price bars for longs and red dots above the price bar for shorts. The formula works fine on futures contracts like ES #F.

    The problem comes when I use the same formula on a stock symbol. The indicator dots signal well above and below the price bars so as to make them impractical to use.

    I will attach a couple of screen shots to illustrate the problem and will include the formula I am using.

    I would like to know what is causing this to happen and how I might go about tweaking the code to fix the problem.
    Attached Files

  • #2
    and here is the stock symbol

    here is the stock chart
    Attached Files

    Comment


    • #3
      Formula is too long to copy and paste in the text section as their are too many characters. I will just have to post it as an attachment.
      Attached Files

      Comment


      • #4
        I moved the post over to this section so the EFS gurus would see it but I'll guess it's a matter of scale or min price movement.

        Thanks.

        Comment


        • #5
          Thanks Scott,

          I just refreshed the page and you replied already LOL.....now thats prompt customer service

          Comment


          • #6
            Re: Signal dots floating above and below price bar

            BennyHeyGolf3
            Those dots are plotted [not drawn since they are values returned by the formula] at the points specified in the following lines of code

            PHP Code:
            if (bYM == true) {                            //if the chart is displaying YM
                         
            vShortValue high(0) + 5;                //Set the short value to be displayed above the bar
                     
            }
                     else {                                        
            //If the chart is displaying a symbol other than YM
                         
            vShortValue high(0) + ;               //Set the short value to be displayed above the bar
                     

            and

            PHP Code:
            if (bYM == true) {                    //if the chart is displaying YM
                                 
            vLongValue low(0) - 5;          //Set the long value to be displayed above the bar
                             
            }
                             else {
                                 
            vLongValue low(0) - 1;          //Set the long value to be displayed above the bar
                             

            hence at +/- 5 points above/below the High/Low of a bar if bYM is true or at +/- 1 point if bYM is false.
            While 1 point may not be a significant range on the Y-axis of ES #F it can be a significant value on a stock depending on the interval being charted.
            A better solution in my opinion is to draw those dots [rather than plotting them] using either the drawShape() or drawShapeRelative() functions with the AboveBar1, AboveBar2, BelowBar1, etc location flags thereby letting the program best determine the distance from the High or Low of a bar regardless of the interval or symbol.
            For the syntax and examples on the use of the drawShape and drawShapeRelative() functions see the links to the corresponding articles in the EFS KnowledgeBawse. Also try searching the forum as there are many examples that have been posted on the use of these functions
            Alex


            Originally posted by BennyHeyGolf3
            I have a formula that gives trade signals indicated by a blue dot below the price bars for longs and red dots above the price bar for shorts. The formula works fine on futures contracts like ES #F.

            The problem comes when I use the same formula on a stock symbol. The indicator dots signal well above and below the price bars so as to make them impractical to use.

            I will attach a couple of screen shots to illustrate the problem and will include the formula I am using.

            I would like to know what is causing this to happen and how I might go about tweaking the code to fix the problem.

            Comment

            Working...
            X