Post subject: Displaying indicators in JForex Strategy
Post rating: 0
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]
API Support
Post subject: Re: Displaying indicators in JForex Strategy