//+------------------------------------------------------------------+ //| RAVI_FX_Fisher2.mq4 | //| T.Y | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright "Copyright © 2005, Luis Guilherme Damiani" #property link "http://www.damianifx.com.br" #property indicator_separate_window #property indicator_buffers 3 #property indicator_color1 RoyalBlue #property indicator_color2 PaleVioletRed #property indicator_color3 PaleVioletRed #property indicator_width1 2 #property indicator_width2 1 #property indicator_width3 1 #property indicator_level1 0 //---- input parameters extern int MAfast = 3; extern int MAslow = 32; extern int MA_Mode = MODE_LWMA; extern double Trigger = 0.0; // 0.07 extern bool Apply_IFT=true; //---- buffers double RAVIfxFishBuffer[]; double LoTrigBuff[]; double HiTrigBuff[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,RAVIfxFishBuffer); SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1,LoTrigBuff); SetIndexStyle(2,DRAW_LINE); SetIndexBuffer(2,HiTrigBuff); if(Trigger>0.0) return(0); int tf = Period(); if(tf==1) Trigger = 0.01; if(tf==2) Trigger = 0.014; if(tf==5) Trigger = 0.02; if(tf==15) Trigger = 0.04; if(tf==30) Trigger = 0.06; if(tf==60) Trigger = 0.08; if(tf==240) Trigger = 0.14; //---- return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); int limit = Bars - counted_bars; double MAValue; if(counted_bars<0) return(-1); if(limit==Bars) limit -= (MAslow+1); for(int i=limit-1; i>=0; i--){ MAValue = 100.0 * (iMA(NULL,0,MAfast,0,MA_Mode,PRICE_TYPICAL,i) - iMA(NULL,0,MAslow,0,MA_Mode,PRICE_TYPICAL,i))*iATR(NULL,0,MAfast,i) /iMA(NULL,0,MAslow,0,MA_Mode,PRICE_TYPICAL,i)/iATR(NULL,0,MAslow,i); if(Apply_IFT) RAVIfxFishBuffer[i] = (MathExp(2*MAValue)-1)/(MathExp(2*MAValue)+1); else RAVIfxFishBuffer[i] = MAValue; LoTrigBuff[i] = -Trigger; HiTrigBuff[i] = Trigger; } return(0); } //+------------------------------------------------------------------+
Sample
Analysis
Market Information Used:
Indicator Curves created:
Implements a curve of type DRAW_LINE
Indicators Used:
Indicator of the average true range
Moving average indicator
Custom Indicators Used:
Order Management characteristics:
Other Features: