Horizontal Lines change colour automatically
Page 1 of 502 12 LastLast
Results 1 to 10 of 19

Thread: Horizontal Lines change colour automatically

  1. #1
    Hello,

    I wonder if possible to code an indior which will alter the colour of manually drawn horizontal lines automatically, to detect if the current price is
    above or beneath them?

    Would be a nice solution to spot when service becomes resistance vice versa.

    Thanks.

  2. #2
    Can anybody code this indior just for drawn horizontal lines?

    Thanks.

  3. #3
    Hey, I am also searching for same thing however, came across this in MQl5. The only issue is that it pulls a single horizontal line, if someone can rectify the code and have it draw more SR horizontal line.
    https://forexintuitive.com/attachmen...9903664208.mq4

  4. #4
    Quote Originally Posted by ;
    Can anyone code this indior just for horizontal lines? Thanks.
    I really don't have mt 4 installed anymore so that I could only give it a shot without even wanting it. If you only need manually drawn lines you need to check the title of the lines. This can't be readily done without tampering with the code of the additional indiors or ea's. Or you also rename your manually traces so and await that.

    A snippet which takes good care of the colour shift
    Inserted Code colour #91;#93; col = someColor,someOtherColor; for(int I = 0; I lt; ObjectsTotal(); I ) string objName = ObjectName(Id ); if(ObjectType(objName) == OBJ_HLINE) double price = ObjectGet(objName,OBJPROP_PRICE1); ObjectSet(objName,OBJPROP_COLOR,col#91;price gt; Close#91;0#93;#93;-RRB-;

  5. #5
    Basically, I'd draw all lines that I recognize as service resistance manually.

    I'd choose a color for Resistance Lines (preceding bid current price) and a color for Service Lines (below current bid price).

    All lines over current price will change into auto resistance color and lines below to auto support color ( change automatically).

    Lines will automatically change color as price moves using these lines.

    It should pick up all horizontal lines and color them accordingly.

  6. #6
    Quote Originally Posted by ;
    Hey, am also looking for same thing but came across this in MQl5. The only problem is that it draws one horizontal line, if someone could egorize the code and have it draw more SR flat line. file
    This indior will be perfect if it let you draw more than one line.

  7. #7
    Quote Originally Posted by ;
    quote This indior would be ideal if it let you draw over a single line.
    Yea accurate, hope someone be kind to egorize the code, would really love.

  8. #8
    Try the attached.

    Set ManualLineColor to the colour of this guide lines plotted. (I don't understand how to have MT4 recognize if or not a line was plotted manually or automatically, hence you will need to set all manual lines to the same specified colour, to set them apart).
    https://forexintuitive.com/attachmen...1184459110.ex4

  9. #9
    Quote Originally Posted by ;
    quote Yea true, hope someone be kind to egorize the code, would actually appreciate.
    Quote Originally Posted by ;
    quote This indior would be ideal if it let you draw over a single line.
    Quote Originally Posted by ;
    HeyI'm also searching for same thing but came across this at MQl5. The only problem is that it draws a single horizontal line, if a person can egorize the code and have it draw more SR flat line. file
    I've had a glance at the code and it seems that it does draw a number of lines but will operate just when the market is available, I ought to have the ability to upgrade the code to function when the markets have been closed so just leave it together and I will get onto it as soon as I get some spare time.

  10. #10
    Quote Originally Posted by ;
    quote quote quote I have had a quick look at the code and it seems that it does draw multiple lines but will work just when the market is available, I should be able to upgrade the code to function when the markets have been shut so just leave it with me and I will get onto it as soon as I get some spare time.
    Alrt, will continue to keep your eye on that come market available. Thank you for checking out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners more information