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.

Help about incomprehensible positions during sar based strategy
 Post subject: Help about incomprehensible positions during sar based strategy Post rating: 0   New post Posted: Mon 06 Feb, 2012, 12:23 

User rating: 0
Joined: Mon 12 Dec, 2011, 17:08
Posts: 32
Location: Hungary,
Hi Support,
I tested a strategy based on two moving averages and sar indicators (see attached file). There was no any problem with it for long time, but sometimes it started to open and close dozens of positions without any visible reason causing in summary big loss (of course on demo account).
The code was tested on 5 mins chart. I attached the 5min chart, and the tick chart.
Is it the misstake of the code or something is wrong with psar indicator? (Testing other psar based strategy I detected similar effects). The situataion is the same during real-time testing and backtesting. I tried to understend but I can't.
Could you help me?
Thank in advance: Kosza


Attachments:
MA_cross_in_sar_trend_SAR_close.java [8.13 KiB]
Downloaded 307 times
Chart_EUR_USD_Ticks_snapshot.png [127.63 KiB]
Downloaded 394 times
Chart_EUR_USD_5 Mins_snapshot.png [28.89 KiB]
Downloaded 325 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: Help about incomprehensible positions during sar based strategy Post rating: 0   New post Posted: Mon 06 Feb, 2012, 15:26 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Consider logging the relevant values in order to find out why particular execution branches get taken:
https://www.dukascopy.com/wiki/#IConsole/Logging_values


 

Jump to:  

  © 1998-2026 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