Converting A List of Trades, Dates and Prices Into EasyLanguage Arrays:
As the old saying goes “a picture is worth a thousand words!” Have you ever been given a list of trades like this:
I have created a small Python script that will take a list of trades like those listed in table above and create the following EasyLanguage:
This just creates the arrays that you can use to graph the trades on a chart. If you are using exact prices you got to make sure your data aligns with the prices in the list of trades. If you are only entering on the open or the close of the bar then the price array isn’t necessary.
The following Python script will also be helpful if you want to learn how to open a file in csv format, read it into lists, convert it and then save the output to a file.
And here is the EasyLanguage code that will step through the arrays and place the trades accordingly. I noticed that sometimes two trades could occur on the same bar, but only two and you will notice in the code where I programmed this occurrence.