Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

Calculate moving average of strategy win/loss ratio
 Post subject: Calculate moving average of strategy win/loss ratio Post rating: 0   Post Posted: Mon 14 Nov, 2011, 05:55 

User rating: 0
Joined: Mon 14 Nov, 2011, 05:16
Posts: 33
Location: PhilippinesPhilippines
Dear Support,

I am developing an automated strategy which in backtest shows a tendency to run with distinct periods of profit and loss. I therefore would like the strategy to be able to calculate a moving average of its own performance, measured as the win/loss ratio of the last 15 trades (and then reduce trade volume in periods with W/L ratio below a threshold).

I expect the best approach is via the getOrdersHistory function, but I can not make a functional algorithm.

I appreciate your assistance!


 
 Post subject: Re: Calculate moving average of strategy win/loss ratio Post rating: 0   Post Posted: Mon 14 Nov, 2011, 09:26 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
If you want us to assist you with
a) writing the strategy please specify more in detail the algorithm and make a strategy request here: viewforum.php?f=112
b) JForex API Strategies, please specify what are you trying to achieve and what parts are unclear or missing.


 

Jump to:  

  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com