Dukascopy
 
 
Wiki JStore Search Login

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

    Submit JForex API bug reports in this forum only.
    Submit Converter issues in Converter Issues.
    Off topics are strictly forbidden.

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

draw indicator problem
 Post subject: draw indicator problem Post rating: 0   New post Posted: Tue 06 Oct, 2015, 12:36 
User avatar

User rating: 0
Joined: Tue 06 Oct, 2015, 02:53
Posts: 2
Location: China,
Image
Image

When I try my indicator, why the chart was abnormal in some instrument or time periods?
Look at the picture, the chart of gbpjyp is right, but gbpusd was displayed abnormal.
Can anybody check my code to help me solve this bug?


Attachments:
14FE.tm.png [36.39 KiB]
Downloaded 263 times
1621.tm.png [41.76 KiB]
Downloaded 294 times
InvMAnew.java [3.37 KiB]
Downloaded 168 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: draw indicator problem Post rating: 0   New post Posted: Tue 13 Oct, 2015, 09:55 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Values of your indicator depend on previously calculated values, therefore it has unstable period and should be recalculated on all bars:
public void onStart(IIndicatorContext context) {
    indicatorInfo = new IndicatorInfo("invma", "invma", "My indicators",
            true, false, true, 1, 1, 1);
    indicatorInfo.setRecalculateAll(true);
    indicatorInfo.setRecalculateOnNewCandleOnly(true);
    ...
}


 

Jump to:  

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