[SOLVED] Using Alligator and Fractals Indicator Problem

How to create strategies and indicators
Message
Author
User avatar
ghostomg
Posts: 12
Joined: Thu Feb 23, 2012 9:01 pm
Location: Indonesia

[SOLVED] Using Alligator and Fractals Indicator Problem

#1 Postby ghostomg » Fri Feb 24, 2012 2:36 am

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.
Last edited by ghostomg on Sun Mar 04, 2012 9:01 pm, edited 2 times in total.

FT Support
Posts: 905
Joined: Sat Jul 11, 2009 10:54 am

#2 Postby FT Support » Fri Feb 24, 2012 8:19 am

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.
Check our other product here:
http://www.forexcopier.com

User avatar
ghostomg
Posts: 12
Joined: Thu Feb 23, 2012 9:01 pm
Location: Indonesia

#3 Postby ghostomg » Fri Feb 24, 2012 8:55 pm

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.
Attachments
img1.png
img1.png (14.07 KiB) Viewed 28782 times

FxMax
Posts: 9
Joined: Mon Nov 28, 2011 10:49 am

#4 Postby FxMax » Mon Feb 27, 2012 3:52 am

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.

User avatar
ghostomg
Posts: 12
Joined: Thu Feb 23, 2012 9:01 pm
Location: Indonesia

#5 Postby ghostomg » Mon Feb 27, 2012 9:46 am

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.
Attachments
chaos-error.zip
(171.88 KiB) Downloaded 990 times

FT Support
Posts: 905
Joined: Sat Jul 11, 2009 10:54 am

#6 Postby FT Support » Thu Mar 01, 2012 4:00 pm

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?
Check our other product here:
http://www.forexcopier.com

User avatar
ghostomg
Posts: 12
Joined: Thu Feb 23, 2012 9:01 pm
Location: Indonesia

#7 Postby ghostomg » Thu Mar 01, 2012 8:42 pm

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.

User avatar
ghostomg
Posts: 12
Joined: Thu Feb 23, 2012 9:01 pm
Location: Indonesia

#8 Postby ghostomg » Thu Mar 01, 2012 9:13 pm

Here I attached print screen of popup window error message.
Attachments
img2.png
img2.png (5.04 KiB) Viewed 28716 times

Stonev
Posts: 204
Joined: Thu Jan 28, 2010 2:20 pm

#9 Postby Stonev » Fri Mar 02, 2012 10:24 pm

Hello,
Send me your code, I can try to fix it.
Just indicator loading part, not whole EA :)

Stonev@yandex.ru
Alexey

User avatar
ghostomg
Posts: 12
Joined: Thu Feb 23, 2012 9:01 pm
Location: Indonesia

#10 Postby ghostomg » Sun Mar 04, 2012 9:00 pm

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.

mspen
Posts: 8
Joined: Wed Sep 10, 2008 3:57 pm
Location: San Diego

Using Alligator and Fractals Indicator Problem

#11 Postby mspen » Sun Nov 11, 2012 12:46 pm

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.

User avatar
ghostomg
Posts: 12
Joined: Thu Feb 23, 2012 9:01 pm
Location: Indonesia

Re: Using Alligator and Fractals Indicator Problem

#12 Postby ghostomg » Fri Nov 23, 2012 8:53 pm

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


Return to “FT API”

Who is online

Users browsing this forum: No registered users and 21 guests