FXTool::FXIndicator MT4 usage

Let us consider arbitrary indicator as:
init() { }
start() { }
deinit { }

FXTool Indicator side behaives similar to the lifecycle of the MT4 indicator or advisor.

Init
int externalindicatorid = Get[IndicatorTag]IndicatorInstance(symbol, period, rateinfos, numrates_info,[additional parameters, depending on indicator]);
For this we create new instance of indiactor and we have access to it by externalindicatorid value.

You can see, that parameters rateinfos and numratesinfos shows that indicator calculates on a fly and no database support is on background.
It's for the first version of indicators. Next generation will be provided with history support and statistics calculation.

Start
There are some points to get our indicator from Init.

double indicatorvalue = GetIndicatorValue(int indicatorid, int shiftback);_
It's very simple call: "Get from instance indicator with indicator ID it's value with dataset it posseses".
Unfortiunnaly there is no automated way with explicit data transform of updating parameters.



Last edited Jul 4, 2011 at 8:48 PM by GapCoder, version 1

Comments

No comments yet.