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.

Ichimoku Indicator Parameters
 Post subject: Ichimoku Indicator Parameters Post rating: 0   New post Posted: Mon 10 Sep, 2012, 06:59 
User avatar

User rating: 0
Joined: Mon 20 Aug, 2012, 07:37
Posts: 8
Location: AustraliaAustralia
Hi Support,

I've been trying to figure out how to use Ichimoku indicator. Per link below,
https://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=7&t=47448&p=64800&hilit=ichimoku#p64800

Correct me if I'm wrong. I guess SENOKU_A is Senkou A and SENOKU_B is Senkou B.

double[] i_sh = indicators.ichimoku(selectedInstrument, selectedPeriod,
                selectedOfferSide, tenkan, kijun, senkou, 1 + kijun);

bar.getClose() < i_sh[SENOKU_A] && bar.getClose() < i_sh[SENOKU_B]


For other parameters, can you please advise how I could get the rest of them, i.e. Tenkan Sen, Kijun Sen, Chinkou Span and Cloud?

In the example above, would they be,

i_sh[TENKAN], i_sh[KIJUN], i_sh[CHINKOU] and i_sh[CLOUD]?

Are there any document on Dukascopy wiki or forum that explains Ichimoku indicator with in depth details?

Thanks.


 
 Post subject: Re: Ichimoku Indicator Parameters Post rating: 0   New post Posted: Mon 10 Sep, 2012, 07:10 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
imtsfx wrote:
For other parameters, can you please advise how I could get the rest of them, i.e. Tenkan Sen, Kijun Sen, Chinkou Span and Cloud?
Run the following example with indName = "ICHIMOKU" to find out the output names and numbers:
https://www.dukascopy.com/wiki/#Calculate_arbitrary_indicator/Calculate_by_shift
imtsfx wrote:
Also, i noticed 2 is the default shift value for Senkou A & B and Cloud on Jforex platform. Does it shift the location of the cloud?
Consider running the next example and compare the outputs with on-chart values to see how it works:
https://www.dukascopy.com/wiki/#Calculate_arbitrary_indicator/Calculate_by_candle_interval
https://www.dukascopy.com/wiki/#Add_indicators_on_chart/Include_in_OHLC


 
 Post subject: Re: Ichimoku Indicator Parameters Post rating: 0   New post Posted: Mon 10 Sep, 2012, 08:13 
User avatar

User rating: 0
Joined: Mon 20 Aug, 2012, 07:37
Posts: 8
Location: AustraliaAustralia
thanks support for the prompt response.

I will be running those examples. will let you know if i have any other questions.


 
 Post subject: Re: Ichimoku Indicator Parameters Post rating: 0   New post Posted: Mon 10 Sep, 2012, 09:45 
User avatar

User rating: 0
Joined: Mon 20 Aug, 2012, 07:37
Posts: 8
Location: AustraliaAustralia
API Support wrote:
imtsfx wrote:
For other parameters, can you please advise how I could get the rest of them, i.e. Tenkan Sen, Kijun Sen, Chinkou Span and Cloud?
Run the following example with indName = "ICHIMOKU" to find out the output names and numbers:
https://www.dukascopy.com/wiki/#Calculate_arbitrary_indicator/Calculate_by_shift
imtsfx wrote:
Also, i noticed 2 is the default shift value for Senkou A & B and Cloud on Jforex platform. Does it shift the location of the cloud?
Consider running the next example and compare the outputs with on-chart values to see how it works:
https://www.dukascopy.com/wiki/#Calculate_arbitrary_indicator/Calculate_by_candle_interval
https://www.dukascopy.com/wiki/#Add_indicators_on_chart/Include_in_OHLC


I was able to get the following output by running Calculate_by_shift,

2012-09-10 08:04:38 Cloud type is Object - class [D, which needs customized processing.
2012-09-10 08:04:38 Senkou B=1.27943
2012-09-10 08:04:38 Senkou A=1.27932
2012-09-10 08:04:38 Chinkou Span=1.27940
2012-09-10 08:04:38 Ki-jun Sen=1.27932
2012-09-10 08:04:38 Tenkan Sen=1.27932
2012-09-10 08:04:38 indicator outputs:
2012-09-10 08:04:38 Set default opt input: Senkou=52
2012-09-10 08:04:38 Set default opt input: Kijun=26
2012-09-10 08:04:38 Set default opt input: Tenkan=9
2012-09-10 08:04:38 inputCount=1, optInputCount=3, outputCount=6

Since I'd like to call and get output for each parameter individually, for instance, what you did in the IchimokuStrategy is,

if (bar.getClose() < i_sh[SENOKU_A]
&& bar.getClose() < i_sh[SENOKU_B]) {

I still couldn't figure it out what the other names I am supposed to use are. Can you help please?

Thanks.


 
The Best Answer  Post subject: Re: Ichimoku Indicator Parameters Post rating: 0   New post Posted: Mon 10 Sep, 2012, 10:34 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
imtsfx wrote:
I still couldn't figure it out what the other names I am supposed to use are. Can you help please?
You don't need to figure out the names, rather the indices which represent them. Afterwards for convenience you can define names for the indices for the sake of readability. Consider the output list:
Quote:
2012-09-10 08:04:38 Cloud type is Object - class [D, which needs customized processing.
2012-09-10 08:04:38 Senkou B=1.27943
2012-09-10 08:04:38 Senkou A=1.27932
2012-09-10 08:04:38 Chinkou Span=1.27940
2012-09-10 08:04:38 Ki-jun Sen=1.27932
2012-09-10 08:04:38 Tenkan Sen=1.27932
2012-09-10 08:04:38 indicator outputs:
Note that it is reverse order, since the latest records are at the top. Hence, you have the following indices for the outputs:
Quote:
4: Senkou B=1.27943
3: Senkou A=1.27932
2: Chinkou Span=1.27940
1: Ki-jun Sen=1.27932
0: Tenkan Sen=1.27932
Thus, if you would use the results for the snippet you provided then you would write:
if (bar.getClose() < (Double)outputs[3]
&& bar.getClose() < (Double)outputs[4]) {


 
 Post subject: Re: Ichimoku Indicator Parameters Post rating: 0   New post Posted: Mon 10 Sep, 2012, 11:36 
User avatar

User rating: 0
Joined: Mon 20 Aug, 2012, 07:37
Posts: 8
Location: AustraliaAustralia
Great support! Thank you so much!

Now I understood where those names came from... Obviously I don't know much about programming.


 

Jump to:  

cron
  © 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