View Single Post
  #8 (permalink)  
Old 11-28-2007, 08:14 PM
Michel Michel is offline
Senior Member
 
Join Date: Feb 2006
Posts: 513
Michel is on a distinguished road
Quote:
Originally Posted by drgoodvibe View Post
Michel, i've just tried your TradeTrace script and I get a little error "Cannot resolve LotMargin"

Here's the script that I have that plots arrows as well as the price of the history etc..
It's always a trick to calculate the LotMargin, because it depends only of the rate of second currency of the pair against the account's currency.
For sample, you have an account in USD and you have to calculate the margin for 1 lot EURCHF; you need to have some where the rate USDCHF (or CHFUSD) (probably on a H1 chart). If you do not have that rate, it's not possible to calculate the LotMargin.
I already asked Metaquote to add the LotMargin in the MarketInfo() function, but they don't care.
Now, two rems:
- I already see that retrying to run twice the script solve the problem to find the rate if you have it (and if it didn't fint it the first try)
- This script is a little old, and it's possible that now there are easier way to calculate the LotMargin (for sample, using MarketInfo() mode Bid which didn't exist at that time)...
Another thing: there is a little bug too : when the mouse's pointer comes close to a segment between the open and the close arrows, it shows how many pips were done in how many time. This time is wrong if it's more than one day. The main purpose of this script was to follow what short time EAs are doing on the same account from several PCs, most of the time in intraday so I never correct the bug.
For all that, you have the source code so everybody can modify it... Enjoy !
Anyways, thanks for your script too !
Reply With Quote