Spread for each trade

 

Hi,

I am looking for script that could import the spread for each trade to csv. Really need to. Please help write the script ...
How to code?

Ps: I try to find it by myself, but cannot find it.

We do not know what to do...=(

 

The spread is the Ask price minus the Bid price and may vary during the lifetime of an order.

In other words, spread is not an attribute of an order.

If you are placing orders using an EA, you could have the EA calculate the spread:

- when the order is placed

- when the order is closed

- both

and have the EA export the information to a csv file.


CB

 
Thank you for your answer, unfortunately I am not a programmer, so it's realizable for me. 
That's why I put request here for help.
 

You won't find a script that does what you ask, for the reasons that I have stated. Spread is not an attribute of an order, possibly varying during the order lifetime, so you can't (programmatically or manually) look up the order in the orders pool and see the "spread for each trade" as you state.

The only option is to add the "spread capture" functionality into your own Expert Advisor when you automate your manual trading strategy.

So, on the subject of programming that strategy - are you prepared to try to learn?


CB

Reason: