Copying trendlines by modifying template files?
Results 1 to 10 of 10

Thread: Copying trendlines by modifying template files?

  1. #1
    I have got a problem!

    In order to easily copy 100 trendlines from one chart to another, without manually copying timestamps and plotting trendlines one by one, I came up with the following. I save the origin trendline template, and when I open it in notepad I simply replie the trendline lt;objectgt; is, then glue them into the destination template. However, with my silly head I completely forgot that although all the timestamps are right, each trendline lt;objectgt; nonetheless, ofcourse, has got the older origin values attached. In other words, trendlines are drawn incorrectly because I would like to use values from the destination symbol (EUR/USD), not the origin symbol/instrument (for example a normal USD index). In order to achieve this I need to instruct the template to draw on it from the actualy lower or upper candle wick on that particular timestamp, on the destination template.

    Does anyone knows of an alternative, an alternative, or present tool that is ready to do the above? Much, much appreciated this moment. Thank you.

  2. #2
    Quote Originally Posted by ;
    You are not the only one with difficulties!! ;--RRB- Save the TL details to 2 arrays. Name to series array. Times to datetime array. Either save the arrays to documents if needed after or use in present chart. Change chart to new emblem and use arrays to draw on the new TL's in the applicable times and set price to H/L of those occasions. HTH. M.
    Glad the aforementioned might be able to solve it, but I absolutely don't have any clue on how to deal with the arrays you mention. I never worked with those in mt4 and I am no mq4 coder either. . But from my understanding these arrays will probably be implemented within an indior, which then brings the H/L price of those occasions? Would you be able to produce an example if you've got enough time?

  3. #3
    At the moment don't have the time.
    When you have no chance return to me and will find out what I can do.

    M.

  4. #4
    Think this should do the fundamentals of what you asked.
    (attempt on a sample chart before using in earnest)

    M.

    EDIT: Just drag new emblem to the chart
    https://www.nigeriaforextrading.com/...1287212707.ex4

  5. #5
    Quote Originally Posted by ;
    Does anybody knows of an alternative, an alternative, or present tool that is ready to do the above? Much, much appreciated this moment. Thank you.
    Good morning Robertk.

    I am not positive if those scripts will make your job easier, but I use them to copy objects from one chart to another.
    Add them into your scripts folder. After the scripts have been additional, restart MT4, then follow the directions for using them.

    1. Drag the backup script on the chart you want to ch objects from.
    2. Drag the glue script on the chart you want the items glued to.

    You'll have to repeat the procedure for every chart you want to add items to.


    https://www.nigeriaforextrading.com/...7407331600.mq4
    https://www.nigeriaforextrading.com/...1549624571.mq4

  6. #6
    They key is not to use templates in any way, rather, serialize the chart items and save them into a file. Here is an example... https://www.nigeriaforextrading.com/...de-system.html

  7. #7
    While both solutions are functioning as intended, the scripts are copying the old origin values (trendline objects need to be restricted to H/L candles only, hence NOT including y-axis price/value). The chart study profile supervisor seems to do exactly the same when it comes to old values. Thanks for the hints nonetheless!

  8. #8
    Quote Originally Posted by ;
    Believe this ought to do the fundamentals of everything you asked. (attempt on a sample chart before using in earnest) M. EDIT: Just drag new emblem to the chart file
    I somehow completely missed your article, but your indior is working perfect! It does the job when I drag and drop a new emblem onto the chart, which I didnt know was possible at the first place for that thing... Much appreciated, conserves up a lot of time!

  9. #9

  10. #10
    You are not the only one with problems!! ;--RRB-

    Conserve the TL details to 2 arrays.
    Name to series array.
    Times to datetime array.
    Either save the arrays to documents if needed later or use in existing chart.
    Change chart to new emblem and use arrays to draw on the new TL's from the relevant times and set price to H/L of these occasions.

    HTH.

    M.

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.