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.

Displaying indicators in JForex Strategy
 Post subject: Displaying indicators in JForex Strategy Post rating: 0   New post Posted: Mon 06 Jun, 2011, 14:02 

User rating: -
Hi there, for my strategy i use RSI Stochastic and 2 sma indicators. I use the following code to show the indicators in my startegy. However i want to know how to change the parameters, so for sma i want to display one with a period of 30 and one with a period of 10. Also I would like to make the colour of each on different. Can you tell me how to do this, i am sure it is simple but i just could not find it anywhere.

Thanks

[code]

// surrently uses default period of 14, HOW DO I CHANGE THIS SO IT DISPLAYS RSI WITH PERIOD 7
context.getChart(selectedInstrument).addIndicator(indicators.getIndicator("rsi"));

// need to know how to set STOCH paramaters
context.getChart(selectedInstrument).addIndicator(indicators.getIndicator("STOCH"));

// Display sma with period 30 slow
context.getChart(selectedInstrument).addIndicator(indicators.getIndicator("sma"));

// Display sma with period 10 fast
context.getChart(selectedInstrument).addIndicator(indicators.getIndicator("sma"));

[/code]


 
 Post subject: Re: Displaying indicators in JForex Strategy Post rating: 0   New post Posted: Tue 07 Jun, 2011, 07:15 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please have a look at the following JForex Wiki article: https://www.dukascopy.com/wiki/index.php ... s_on_chart


 

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