Hello, I wanted to get to know to the alligator indicator and called it in a test strategy by double[] alligator = context.getIndicators().alligator(instrument, period, OfferSide.BID, IIndicators.AppliedPrice.CLOSE, JAW_TIME_PERIOD, TEETH_TIME_PERIOD, LIPS_TIME_PERIOD, 1);
with JAW_TIME_PERIOD = 13, TEETH_TIME_PERIOD = 8 and LIPS_TIME_PERIOD = 5. Instrument = USD/JPY and Period = daily. I ran the strategy for USD/JPY daily starting at 1st Jan. 2010. For the 3rd Jan. 2010 I get the following values: alligator[0] = 91,24 alligator[1] = 91,88 alligator[2] = 92,36 but on the chart the following values are displayed: alligator[0] = 90,114 alligator[1] = 90,987 alligator[2] = 91,895 An image of the relevant chart image is attached (3rd Jan. is in Magenta, horizontal lines indicate values). Source code is attached too. My chart preferences are 'Flats Filter is disabled' and 'Sunday Daily Candles Filter is disabled'.
What did I wrong? Modifying the shift -/+ 1 or modifying the checkboxes in the preferences don't lead to relevant corrections.
Many thanks in advance!
Attachments: |
AlligatorStrategy.java [3.52 KiB]
Downloaded 372 times
|
Chart_USD_JPY_Daily_snapshot.2010.png [24.66 KiB]
Downloaded 438 times
|
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on
this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control
on their content. Anyone accessing this webpage and downloading or otherwise making use of any document,
data or information found on this webpage shall do it on his/her own risks without any recourse against
Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from
the use and/or reliance on any document, data or information found on this webpage.
|
|