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.

CCI doesn't recognize "Level"
 Post subject: CCI doesn't recognize "Level" Post rating: 0   New post Posted: Fri 30 Jan, 2015, 19:02 

User rating: 2
Joined: Wed 18 May, 2011, 17:36
Posts: 49
Location: FranceFrance
Hello,

I try to modify a Jstore strategy with CCI. I want to use zero level for buy or sell, and other level (as +50 or -50) to exit the trade.
Buy if CCI >0 or Sell if CCI<0 works fine.
UNFORTUNATELY... :o Nothing happens when I set a level for exit. It compils ok without error but the strategy doesn't care of the level...
Does anybody knows how to use correct level settings in this strategy for exit?
Any help would be appreciated!
Thanks

Math


Attachments:
TestCCI.java [36.51 KiB]
Downloaded 57 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: CCI doesn't recognize "Level" Post rating: 0   New post Posted: Mon 02 Feb, 2015, 16:56 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hello
Please try to debug the strategy using console output. It is useful to place printouts in different places to see which path the code takes:
console.getOut().println("ExitBuy = true;");

It is also possible to check intermediate variables:
console.getOut().println(toStr(bar.getTime()));


 

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