Announcement

Collapse
No announcement yet.

How To Draw Alerted Trendlines

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

  • How To Draw Alerted Trendlines

    One of the first things a new user wishes to do with EFS language, me included, is to draw alerted trendlines.
    That's how I drew my own:
    I° Step: with the function onLButtonDblClk get the coordinates of two points.
    x1=barIndex1, y1=yValue1,
    x2=barIndex2, y2=yValue2

    II° Step: get the slope of the line
    slope=(y2-y1)/(x2-x1)

    III° Step: calculate y2=target price at bar 0
    x1=barIndex1, y1=yValue1,
    x2=0 , y2=y1+slope(0-x1)

    IV° Step: draw line and check conditions

    V° Step: when new bar comes change x1 coordinate to x1-1bar
    and go to III° Step.

    I attached a basic example
    Regards.
    Massimo Rizzi
    Attached Files

  • #2
    Hi Massimo,

    Thanks for posting the code example.

    Nice structured code with good comments. Your English is quite satisfactory btw (in reference to our previous discussion in this thread ).

    You seem to have come up to speed very quickly.

    To your credit, you have have used the Knowledgebase and other available resources, and with only a little assistance from others, have provided this nice example.

    Comment


    • #3
      Hi Massimo,

      Nice tool.

      Thanks

      Comment


      • #4
        Hi Steve, Hi Wayne
        well, a few month agò, my italian broker told me it was possible to trade with eSignal and EFS language. I couldn't believe that.
        I was at the seventh heaven. The idea to create an application program able to trade automatically really excited me.
        So I started studying online manuals, I downloaded many of your shared files and studied them (so Steve you are one of my teachers) and started putting questions on the forum. Some were kind to reply me, as you did, others not !
        So I felt in debt of gratitude to the forum and tried to repay.
        For me it's not a job, but just an hobby.
        Let's start in the search of the Holy Grail.
        Bye
        Massimo

        Comment

        Working...
        X