Hello support,
I have problem with downloading ZigZag data on some periods.
E.g. If I use 4 months custom period on EURUSD and I want to download last 100 value of ZigZag indicator I receive only 13 or in other method 0!.
I use code:
Instrument myInstrument = Instrument.EURUSD;
Period myPeriod = Period.createCustomPeriod(Unit.Month, 4);
long time = history.getLastTick(myInstrument).getTime();
long ZZStartTime = history.getBarStart(myPeriod, time-myPeriod.getInterval()*100);
long ZZEndTime = history.getBarStart(myPeriod,time);
double[] zig = indicators.zigzag(myInstrument, myPeriod, OfferSide.BID, 12, 5, 3, Filter.WEEKENDS, ZZStartTime, ZZEndTime);
double[] zig2 = indicators.zigzag(myInstrument, myPeriod, OfferSide.BID, 12, 5, 3, Filter.WEEKENDS, 100, ZZStartTime, 0);
console.getOut().println("ZigZag table (should be 100) and now it is: "+zig.length);
console.getOut().println("ZigZag2 table (should be 100) and now it is: "+zig2.length);
and I receive:
Quote:
13:32:37 ZigZag2 table (should be 100) and now it is: 0
13:32:37 ZigZag table (should be 100) and now it is: 13
In attachment full strategy code to test.
This happen also on different periods and currency pairs (but not on all).
Please help.