Page 1 of 1

[SOLVED] Using Alligator and Fractals Indicator Problem

Posted: Fri Feb 24, 2012 2:36 am
by ghostomg
Dear all,

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.

Posted: Fri Feb 24, 2012 8:19 am
by FT Support
Hello,

did you get indicator handle after CreateIndicator function call?

what values of iAlligator and iFractal variables did you get?

maybe there was an error in the parameters which you pass to the indicator.

Posted: Fri Feb 24, 2012 8:55 pm
by ghostomg
FT Support wrote:Hello,

did you get indicator handle after CreateIndicator function call?

what values of iAlligator and iFractal variables did you get?

maybe there was an error in the parameters which you pass to the indicator.


Here the print screen of Integer Handle value I got after starting the Test.
Anything wrong?

Thank you for the Support.

Posted: Mon Feb 27, 2012 3:52 am
by FxMax
ghostomg wrote:
FT Support wrote:Hello,

did you get indicator handle after CreateIndicator function call?

what values of iAlligator and iFractal variables did you get?

maybe there was an error in the parameters which you pass to the indicator.


Here the print screen of Integer Handle value I got after starting the Test.
Anything wrong?

Thank you for the Support.


Hello,

Can you send whole code of your strategy? I'll try to compile and reproduce your error.

Posted: Mon Feb 27, 2012 9:46 am
by ghostomg
okey..I've attached my source code, since there is an error, so the code still without logic or algorithm,I'm only testing if 'CreateIndicator' and 'GetIndicatorValue' function are return right value. It's Delphi Code.

very appreciate your support and any solution.Thank you.

Posted: Thu Mar 01, 2012 4:00 pm
by FT Support
Hello,

Probably the error happens because you use CreateIndicator function in the GetSingleTick procedure.

Please try to remove CreateIndicator call from there. Does it help?

Posted: Thu Mar 01, 2012 8:42 pm
by ghostomg
FT Support wrote:Hello,

Probably the error happens because you use CreateIndicator function in the GetSingleTick procedure.

Please try to remove CreateIndicator call from there. Does it help?


I've try to put only on ResetStrategy procedure and I got popup window error every start the test. any others idea? I think there are something wrong with the Fractal parameter while initialize with Create Indicator base on strategies help file, since there are no source code of fractal indicator, please help me to solve.

Posted: Thu Mar 01, 2012 9:13 pm
by ghostomg
Here I attached print screen of popup window error message.

Posted: Fri Mar 02, 2012 10:24 pm
by Stonev
Hello,
Send me your code, I can try to fix it.
Just indicator loading part, not whole EA :)

Stonev@yandex.ru
Alexey

Posted: Sun Mar 04, 2012 9:00 pm
by ghostomg
Hi, at last, problem solve, i make my own fractal function n work fine for multiple timeframe :D Alligator indicator also could give the current bar value. Thanks for the support.

Using Alligator and Fractals Indicator Problem

Posted: Sun Nov 11, 2012 12:46 pm
by mspen
Any chance you would publish the correct code here so we know what the fix was. Just the lines initializing Fractal and getting the values would be helpful.

Re: Using Alligator and Fractals Indicator Problem

Posted: Fri Nov 23, 2012 8:53 pm
by ghostomg
mspen wrote:Any chance you would publish the correct code here so we know what the fix was. Just the lines initializing Fractal and getting the values would be helpful.


The posibilities is maybe there is some version of FT 2 Indicator in installer build in. I backup my old indicator *.dll file, then I download a newest installer from FT website, install it, then I found there are different modify date between this indicator same file. dont know it could be posible happened.

For the current, I'm using the newest alligator & fractal indicator from newest FT Installer into my Strategies, not from my own created before, and it worked fine until now.

Little bit suggestion, could you give some version information into indicator interface or something if any different version, just to make sure we use the right version as well :D

Thank you