Document on library

Examples step by step how to make your own automated strategy or user indicator
Message
Author
toyogo00
Posts: 10
Joined: Fri Mar 20, 2009 12:58 am

Document on library

#1 Postby toyogo00 » Fri Mar 20, 2009 1:06 am

Hi,

I'm an experienced programmer in MT4 and I'm familiar with C++ programming language. I would like to find out

a. is there a document in FT with all the library - command/functions?
b. is there a document in comparison between the two packages' library. for example,

MT 4 ----------------------- FT
SetIndexBuffer() ------- equivalent of this function
SetIndexLabel() -------- equivalent of this function
iMAOnArray() ------------ equivalent of this function
IndicatorCounted() ----- equivalent of this function

Regards,
Toyogo

dackjaniels
Posts: 151
Joined: Tue Feb 24, 2009 1:03 pm

Re: Document on library

#2 Postby dackjaniels » Fri Mar 20, 2009 4:57 am

toyogo00 wrote:Hi,

I'm an experienced programmer in MT4 and I'm familiar with C++ programming language. I would like to find out

a. is there a document in FT with all the library - command/functions?
b. is there a document in comparison between the two packages' library. for example,

MT 4 ----------------------- FT
SetIndexBuffer() ------- equivalent of this function
SetIndexLabel() -------- equivalent of this function
iMAOnArray() ------------ equivalent of this function
IndicatorCounted() ----- equivalent of this function

Regards,
Toyogo



Hi Toyogo,
The ForexTester (FT) help files contain details of the functions/commands available for creating indicators and strategies (Help Menu, Indicators API and Strategies API).

AFAIK there is no document describing equivalent functions in MT4 but, whilst I am not an expert MT4 programmer, I have been able to quite easily identify the appropriate functions.

A few points that may help reduce the learning curve:

1. The FT Examples folder contains some example indicator and strategy code allowing one to see how other indicators/strategies have been written. As the software author uses Delphi these examples are almost exclusively Delphi but should give you a good head start as Delphi is easy to understand (source for all FT indicators is included).

2. The same folders contain four files that house the functions available to you. For C++ these files are IndicatorInterfaceUnit.h, StrategyInterfaceUnit.h and two DIFFERENT versions of TechnicalFunctions.h. Look through these to be enlightened a little further.

3. FT does not contain such a wide range of functions as MT4, such as iStochastic, iMAOnArray, iCustom, etc. However, you can write your own functions within your indicator/strategy using any available C++ commands so the power available is virtually limitless. Also, much of the code you might need is already available in the existing indicator source code examples (albeit in Delphi).

4. Finally, I should point out one fairly significant difference between MT4 and FT. As you will know, in MT4 you are required to iterate through each bar in the chart in order to calculate them (using the IndicatorCounted() and bars functions). In FT, this is not required. FT automatically applies your calculations to every bar that hasn't already been 'counted'. I find this a really neat feature and cuts down on the required code.

I hope the above helps a little, I have recently started using FT and find it's a great product and the support Mike (the author) gives is second to none. :P

Regards,
Steve


Return to “Programming lessons”

Who is online

Users browsing this forum: No registered users and 23 guests