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.

How to code this
 Post subject: How to code this Post rating: 0   New post Posted: Thu 13 Mar, 2014, 07:40 
User avatar

User rating: 0
Joined: Tue 02 Aug, 2011, 11:35
Posts: 32
Location: United Arab Emirates, Dubai
Hi everyone.

Anyone know how I would code the following.

Sell : If rsi crosses below level X then rises above X I want to sell the Second time it crosses below level X as long as it hasn't been above level Y

Buy: if rsi crosses above level Y then falls below Y I want to buy the second time it crosses above level Y as long as it hasn't been below level X


thanks


 
 Post subject: Re: How to code this Post rating: 0   New post Posted: Tue 18 Mar, 2014, 15:07 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
Hi,

You can give it a try in Visual JForex. Maybe it is easier for you.
https://www.dukascopy.com/swiss/english/ ... /features/

If you really want to do it directly in Java, this example doesn't sound too complicated.
Take a look on the following pages to get started:
https://www.dukascopy.com/wiki/#Simple_Strategy
https://www.dukascopy.com/fxcomm/fx-arti ... ead&id=847

In case you stuck, just post the problem here...


Good luck!


 
 Post subject: Re: How to code this Post rating: 0   New post Posted: Tue 18 Mar, 2014, 18:29 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Here is an example strategy which follows the trends:
https://www.dukascopy.com/wiki/#Create_Alert/Play_sound_on_indicator_trend_change
For more on indicator calculation see:
https://www.dukascopy.com/wiki/#Indicator_Calculation
If you are new to JForex-API, start here:
https://www.dukascopy.com/wiki/#Use_in_JForex
We strongly suggest writing strategies in an IDE, which provides instant assistance on compile-time errors and other benefits, see:
https://www.dukascopy.com/wiki/#Use_in_Eclipse
or
https://www.dukascopy.com/wiki/#Use_in_NetBeans
You can also resort to learning JForex-API from our tutorial, see:
https://www.dukascopy.com/wiki/#Strategy_Tutorial


 
 Post subject: Re: How to code this Post rating: 0   New post Posted: Wed 19 Mar, 2014, 05:18 
User avatar

User rating: 0
Joined: Tue 02 Aug, 2011, 11:35
Posts: 32
Location: United Arab Emirates, Dubai
Thanks for the replies. I'll see how I go. I've done a few simple ones in java before.


 

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