Announcement

Collapse
No announcement yet.

Draw horizontal lines according to time candles

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

  • Draw horizontal lines according to time candles

    Hi,

    I would really appreciate if someone could help to turn the following into an .efs sccript.

    Take the lowest value of the candles 9:56, 9:57 and 9:58 on a 1 min chart... we will call this value "minimum".

    Then:

    1) Draw a green horizontal line for the next 4 hours at the minimum value over the 1 min chart.
    Write the value of "minimum", immediately below the green line.

    2) Draw a red horizontal line at ("minimum" - 30 pips) for the next 4 hours.
    Write the value of (minimum - 30 pips) below the red line.

    3) Draw a blue horizontal line at ("minimum + 70 pips) for the next 4 hours.
    Write the value of (minimum +70 pips)

    The writings could be placed at 10:00. over/under each corresponding line.

    Thanks so much.

    Leopoldo

  • #2
    I am not wild about this but here is a way to do it that I got to work. What are 30 pips?
    Attached Files

    Comment


    • #3
      Leo the Lion

      This has the right colors added
      Attached Files

      Comment


      • #4
        THANKS!.

        Twice I've posted here and twice that you've helped right away...first time on a sunday night. I am really grateful.

        I think I can take the .efs from here to write the prices adding and substracting the pips I mentioned on previous post.

        A pip is the minimum price movement on Forex so if EUR/USD goes from 1.0652 to 1.0653 it moved 1 pip; and it goes the same for the other currencies (i.e Yen from 120.31 to 120.32). Since most of Forex operations are highly leveraged...100 to 1 or even 250 to 1, 1 pip in an average broker platform would mean 10 to 25 USD. Funny, isn't it?

        Once again many thanks.

        Regards,

        Leopoldo

        Comment


        • #5
          You are welcome, I am always glad to help when I can

          Thanks for the pip lesson, I always called 'em handles.

          Comment


          • #6
            In Spain we say that there is a sort of people that when you help them once by giving them a hand the next occasion they will ask for your elbow...

            Well, I might be one of this sort.

            As mentioned in my previous post the .efs works fine over live prices (i.e only today's data loaded) but when you try to visually backtest the drawed lines the "typed" characters consume large CPU resources and it takes so much time to view more than 5 days back, since everyday you go back the less memory resources you've got left.

            Based on David's script I wrote an .efs using DrawLineRelative function with the spirit of "typing" just one object - one line -, instead of the 180 characters needed to accomplish the same task using DrawTextRelative. This .efs seems to work but only for the last day, on the previous days it only writes the reference numbers but not the reference lines (I suppose it is because the program lost the reference day every new day...?).

            Well, I'm stuck at this point!. Enclosed please find an .efs script that does what I need and uses reasonable CPU resources but only works for the last or current day.

            Can you do some "magic" on leo2.efs and make it work for previous days too?

            May I have your elbow then?.

            Thanks again,

            Leo the Lion
            Attached Files

            Comment


            • #7
              Se une mi primer codo
              Attached Files

              Comment


              • #8
                David,

                Once again you are the man!.

                Thanks so much for your weekend help.

                Leopoldo

                P.D. You keep up like this and I appoint you as my wedding's best man. =).

                Comment

                Working...
                X