Thread: How to code?
View Single Post
  #2 (permalink)  
Old 04-11-2006, 10:11 PM
Mohammed's Avatar
Mohammed Mohammed is offline
Senior Member
 
Join Date: Mar 2006
Posts: 119
Mohammed is on a distinguished road
Question

Quote:
Originally Posted by harriss
i would like to write a function which gets the max drawdown from trade that have been closed. i have come up with two solutions.

1. calculate the drawdown while the trade is still active. saving the number to a global variable and writing the data to file according to ticket number. MT4 would always have to be online.

2. get the drawdown by geting the highest high or lowest low from the 1 min chart. the problem here is we have to have the 1 min history for the trade. (i would use this method if i could get the 1 min bars neccessary if they werent already downloaded)

I would like to come up with a nicer way of getting max drawdown.

Any input is appreciated.
Salam harriss,

What did you mean by "drawdown"?
Do you mean the maximum lose one of closed trades has been made?
__________________
There is a fine line between freedom of expression and hate literature.
Reply With Quote