Metto quà il Ravi fx fisher in metatrader, se qualcuno bravo in programmazione lo riesce a convertire in visual trader possiamo vedere se è utilizzabile in real time.
Name := trend power
Author := Copyright © 2004, Nick Bilak
Link :=
Separate Window := Yes
First Color := Red
First Draw Type := Line
Use Second Data := Yes
Second Color := DimGray
Second Draw Type := Line
Second Symbol := 218
]]*/
Inputs : SMAfast(5),SMAslow(55);
var: LoTrigger(-0.125),HiTrigger(0.125);
Variables : shift(0), MAType(1), cnt(0), loopbegin(0), first(True), prevbars(0);
Variables : sum(0), smconst(0), prev(0), weight(0), linear(0),IFish(0);
Variables : MAValue(0), MAstring("");
var: signal(0),noise(0),efRatio(0),i(0), Fastest(0.6667), Slowest(0.0645);
SetLoopCount(0);
// initial checkings
// check for additional bars loading or total reloading
If Bars < prevbars Or Bars-prevbars>1 Then first = True;
prevbars = Bars;
If first Then Begin
// loopbegin prevent couning of counted bars exclude current
loopbegin = Bars-SMAslow-1;
If loopbegin < 0 Then Exit; // not enough bars for counting
if period >70 then {LoTrigger=-0.15;HiTrigger=0.15;}else {LoTrigger=-0.07;HiTrigger=0.07;};
first = False;
End;
// moving average
loopbegin = loopbegin+1; // current bar is to be recounted too
For shift = loopbegin Downto 0 Begin
MAValue = 100 * (iMA(SMAfast,MODE_EMA,shift) - iMA(SMAslow,MODE_EMA,shift))*iatr(SMAfast,shift)/iMA(SMAslow,MODE_EMA,shift)/iatr(SMAslow,shift);
IFish=(Exp(2*MAValue)-1)/(Exp(2*MAValue)+1);
SetIndexValue(shift,IFish);
if IFish<0 Then
SetIndexValue2(shift,LoTrigger)
Else
SetIndexValue2(shift,HiTrigger);
loopbegin = loopbegin-1; // prevent to previous bars recounting
End;