I'm new in programming Forex Tester 2 Strategies, try to make Bill Williams Chaos Theory Strategies, I already follow the Forex Tester 2 Help file or searching on web (this forum), but still got some problem :
1. How can I get current bar Indicator Value from each Alligator buffer index (jaws,teeth,lips)? here my script sample :
Code: Select all
iAlligator := CreateIndicator('GBPUSD', 30, 'Alligator',format('%s;%s;%d;%d;%d;%d;%d;%d', [StrMAType(ma_SSMA), StrPriceType(pt_HL2),13, 8, 8, 8, 5, 3]));
bJaws := GetIndicatorValue(iAlligator, 0, 0); // JAWS
bTeeth := GetIndicatorValue(iAlligator, 0, 1); // TEETH
bLips := GetIndicatorValue(iAlligator, 0, 2); // LIPS
since I always got the shift value, not current bar values for Jaws, Teeth, lips.
2. How can I use the Fractals? since I always got the "error in Strategy...". while start the test. here my script sample :
Code: Select all
iFractal := CreateIndicator('GBPUSD', 30, 'Fractals', '');
bFracUp := GetIndicatorValue(iFractal, 0, 0); // FRACTALS UP
bFracDown := GetIndicatorValue(iFractal, 0, 1); // FRACTALS DOWN
Anyone can help me, urgently need a help. Thank you before.