|
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 for feedDescr |
maxi
|
Post subject: ichimoku for feedDescr |
Post rating: 0
|
Posted: Thu 04 Oct, 2012, 18:03
|
|
User rating: 0
Joined: Thu 03 Nov, 2011, 21:46 Posts: 68 Location: Russian Federation,
|
hi,
please help:
Integer[] optParams = new Integer[3]; optParams[0] = Tenkan; optParams[1] = Kijun; optParams[2] = Senkou; Object[] ich = calculateIndicator2( "ICHIMOKU", feedDescr, AppliedPrice.CLOSE, new Object[]{optParams}, 1, lastBar.getTime(), 0);
how I can have senkoA and senkoB
example need: if ( senkoA > senkoB) {
thanks
|
|
|
|
 |
API Support
|
Post subject: Re: ichimoku for feedDescr |
Post rating: 0
|
Posted: Fri 05 Oct, 2012, 09:08
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
maxi
|
Post subject: Re: ichimoku for feedDescr |
Post rating: 0
|
Posted: Fri 05 Oct, 2012, 09:30
|
|
User rating: 0
Joined: Thu 03 Nov, 2011, 21:46 Posts: 68 Location: Russian Federation,
|
|
|
|
 |
maxi
|
Post subject: Re: ichimoku for feedDescr |
Post rating: 0
|
Posted: Fri 05 Oct, 2012, 10:33
|
|
User rating: 0
Joined: Thu 03 Nov, 2011, 21:46 Posts: 68 Location: Russian Federation,
|
@Configurable("Tenkan") public int Tenkan = 9; @Configurable("Kijun") public int Kijun = 26; @Configurable("Senkou") public int Senkou = 52;
Integer[] optParams = new Integer[3]; optParams[0] = Tenkan; optParams[1] = Kijun; optParams[2] = Senkou; Object[] ich = calculateIndicator2( "ICHIMOKU", feedDescr, AppliedPrice.CLOSE, new Object[]{optParams}, 1, lastBar.getTime(), 0); double[] pointA = (double[]) ((Object[]) ich[3])[0]; double[] pointB = (double[]) ((Object[]) ich[3])[0];
this not work .
You can help for correct work? example need: if ( senkoA > senkoB) {
thanks
|
|
|
|
 |
API Support
|
Post subject: Re: ichimoku for feedDescr |
Post rating: 0
|
Posted: Fri 05 Oct, 2012, 11:15
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Please go through the previously given examples to understand what optional inputs to pass, what outputs to expect, and how to process the calculated outputs.
|
|
|
|
 |
maxi
|
Post subject: Re: ichimoku for feedDescr |
Post rating: 0
|
Posted: Fri 05 Oct, 2012, 13:11
|
|
User rating: 0
Joined: Thu 03 Nov, 2011, 21:46 Posts: 68 Location: Russian Federation,
|
API Support wrote: Please go through the previously given examples to understand what optional inputs to pass, what outputs to expect, and how to process the calculated outputs. You can't help here???? why spend your and my time, for post all day. just 5 lines only. for correct work indicator. please help
|
|
|
|
 |
maxi
|
Post subject: Re: ichimoku for feedDescr |
Post rating: 0
|
Posted: Fri 05 Oct, 2012, 14:57
|
|
User rating: 0
Joined: Thu 03 Nov, 2011, 21:46 Posts: 68 Location: Russian Federation,
|
helloooo support anybody !
Object[] ichimoku = indicators.calculateIndicator(instrument,Period.FIVE_MINS, new OfferSide[]{OfferSide.BID}, "ICHIMOKU", new IIndicators.AppliedPrice[]{IIndicators.AppliedPrice.CLOSE}, optParams, Filter.WEEKENDS, 1, tick.getTime(), 0); double[] pointA = (double[]) ((Object[]) ichimoku[5])[0]; double senkouA = pointA[0]; double[] pointB = (double[]) ((Object[]) ichimoku[5])[0]; double senkouB = pointB[1];
how make correct for feedDescr???? example need: if ( senkoA > senkoB) {
|
|
|
|
 |
maxi
|
Post subject: ichimoku feedDescr (part2 ) |
Post rating: 0
|
Posted: Fri 05 Oct, 2012, 17:18
|
|
User rating: 0
Joined: Thu 03 Nov, 2011, 21:46 Posts: 68 Location: Russian Federation,
|
hello support!
please help with ichimoku adapt for feedDescr :
how to make correctly an indicator request SenkouA and SenkoB :
Integer[] optParams = new Integer[3]; optParams[0] = Tenkan; optParams[1] = Kijun; optParams[2] = Senkou;
Object[] ichimoku = indicators.calculateIndicator(instrument,Period.FIVE_MINS, new OfferSide[]{OfferSide.BID}, "ICHIMOKU", new IIndicators.AppliedPrice[]{IIndicators.AppliedPrice.CLOSE}, optParams, Filter.WEEKENDS, 1, bar.getTime(), 0); I need example: If ( senkouA > senkouB ){
Regards
|
|
|
|
 |
maxi
|
Post subject: Re: ichimoku for feedDescr |
Post rating: 0
|
Posted: Mon 08 Oct, 2012, 07:54
|
|
User rating: 0
Joined: Thu 03 Nov, 2011, 21:46 Posts: 68 Location: Russian Federation,
|
hello API Support you can show how to receive values for SenkoA and SenkoB ?
it is difficult for you also?
|
|
|
|
 |
API Support
|
Post subject: Re: ichimoku for feedDescr |
Post rating: 0
|
Posted: Mon 08 Oct, 2012, 13:38
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
package jforex.feed.indicators;
import com.dukascopy.api.*; import com.dukascopy.api.IIndicators.AppliedPrice; import com.dukascopy.api.feed.*; import com.dukascopy.api.feed.util.TimePeriodAggregationFeedDescriptor;
public class FeedsIchimoku implements IStrategy {
private IIndicators indicators; private final static int TENKAN_SEN = 0, KIJUN_SEN = 1, CHINOKU_SPAN = 2, SENKOU_A = 3, SENKOU_B = 4;
@Override public void onStart(IContext context) throws JFException { indicators = context.getIndicators(); IFeedDescriptor feedDesc = new TimePeriodAggregationFeedDescriptor(Instrument.EURUSD, Period.ONE_HOUR, OfferSide.BID, Filter.NO_FILTER); OfferSide[] offerSides = new OfferSide[] { feedDesc.getOfferSide() }; Object[] ichimoku = indicators.calculateIndicator(feedDesc, offerSides, "ICHIMOKU", new AppliedPrice[] { AppliedPrice.CLOSE }, new Object[] { 9, 26, 52 }, 1);
double senkouA = (Double) ichimoku[SENKOU_A]; double senkouB = (Double) ichimoku[SENKOU_B]; }
public void onTick(Instrument instrument, ITick tick) throws JFException { }
public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException { }
public void onMessage(IMessage message) throws JFException { }
public void onAccount(IAccount account) throws JFException { }
public void onStop() throws JFException { }
}
|
|
|
|
 |
maxi
|
Post subject: Re: ichimoku for feedDescr |
Post rating: 0
|
Posted: Mon 08 Oct, 2012, 14:11
|
|
User rating: 0
Joined: Thu 03 Nov, 2011, 21:46 Posts: 68 Location: Russian Federation,
|
Thank you. It was really hard for me to.
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|