Programming Script for Reading Prices from a txt file and setting the OBJ_Hline object

 

I am new to programming the algorithmic language for MQL4. I am trying to program a script that will read prices from a txt or CSV file and insert horizontal lines in a chart for each value. Sometimes there could be 60 to 70 lines per chart. It would be nice to also be able to set the color property of the line.


If needed I could attach a sample of data.


Thanks for your help.

 

I wrote something like this just a week or two ago. I have someone who sends out call outs of what the market might do in a buy or sell, I just copy the data into a csv file and pull it into my EA, then I set lines on the chart based on the information in the csv data. If you are talking about 60 to 70, that is going to have to be wrapped in a while or for statement. I doubt you are going to want to write the code for each and every line.

I found my resource for opening files at:

File Open Operations

The code in this document also shows how to create a vertical line, with a little homework, you could figure out how to change that vline to a hline (horizontal line). Now just repeat 60 to 70 times.

 
I'll look at the code and attempt to assimilate to my task. Thank you very much for the link.
 
if you still need help with this let me know, I wrote a script to parse emails and an accompanying EA to place the orders and draw Target Levels recently.
Reason: