Indicatore MetaTrader

Indicatore MetaTrader

Indicatore Metatrader - ATR Levels

Indicatore MetaTrader /+------------------------------------------------------------------+ //| AT ...

Indicatore MetaTrader 
/+------------------------------------------------------------------+ //| ATR Levels.mq4 | //| Mike Ischenko | //| Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. | //+------------------------------------------------------------------+ #property copyright "Mike Ischenko" #property link "Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo." #property indicator_chart_window extern int ATRPeriod = 10; double rates_d1[][6]; double H1, H2, H3, H4, H4t, H5, L5, L4, L4t, L3, L2, L1, halfatr, fullatr; int timeshift=0, timeshifts=0, beginner=0; int periods; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators //---- return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- TODO: add your code here ObjectDelete("H4atr line"); ObjectDelete("L4atr line"); ObjectDelete("L4atr label"); ObjectDelete("H4atr label"); ObjectDelete("H4tatr line"); ObjectDelete("L4tatr line"); ObjectDelete("L4tatr label"); ObjectDelete("H4tatr label"); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); //if (counted_bars<1) return(0); switch (Period()) { case PERIOD_M1: {timeshifts=60; beginner=Hour()*60;} break; case PERIOD_M5: {timeshifts=300; beginner=Hour()*12;} break; case PERIOD_M15: {timeshifts=900; beginner=Hour()*4;} break; case PERIOD_M30: {timeshifts=1800; beginner=Hour()*2;} break; case PERIOD_H1: {timeshifts=3600; beginner=Hour()*1;} break; case PERIOD_H4: {timeshifts=14400; beginner=Hour()*0.25;} break; case PERIOD_D1: {timeshifts=86400; beginner=Hour()*0;} break; } timeshift=timeshifts*24; if(Period() > 86400) { Print("Error - Chart period is greater than 1 day."); return(-1); // then exit } ArrayCopyRates(rates_d1, Symbol(), PERIOD_D1); //beginner=Hour(); fullatr = iATR(Symbol(), PERIOD_D1, ATRPeriod, 1); L4 = rates_d1[1][3] - fullatr; H4 = rates_d1[1][2] + fullatr; L4t = rates_d1[0][3] - fullatr; H4t = rates_d1[0][2] + fullatr; halfatr = fullatr * 0.5; H1 = H4+1.5*fullatr; H2 = H4+fullatr; H3 = H4+halfatr; L3 = L4-halfatr; L2 = L4-fullatr; L1 = L4-1.5*fullatr; if (ObjectFind("H4atr Line") != 0) { ObjectCreate("H4atr line",OBJ_HLINE,0,Time[0],H4); ObjectSet("H4atr line",OBJPROP_COLOR,Yellow); ObjectSet("H4atr line",OBJPROP_WIDTH,1); } else { ObjectMove("H4atr line", 0,Time[0],H4); } if (ObjectFind("L4atr Line") != 0) { ObjectCreate("L4atr line",OBJ_HLINE,0,Time[0],L4); ObjectSet("L4atr line",OBJPROP_COLOR,Yellow); ObjectSet("L4atr line",OBJPROP_WIDTH,1); } else { ObjectMove("L4atr line", 0,Time[0],L4); } if (ObjectFind("H4tatr Line") != 0) { ObjectCreate("H4tatr line",OBJ_HLINE,0,Time[0],H4t); ObjectSet("H4tatr line",OBJPROP_COLOR,Yellow); ObjectSet("H4tatr line",OBJPROP_WIDTH,1); } else { ObjectMove("H4tatr line", 0,Time[0],H4t); } if (ObjectFind("L4tatr Line") != 0) { ObjectCreate("L4tatr line",OBJ_HLINE,0,Time[0],L4t); ObjectSet("L4tatr line",OBJPROP_COLOR,Yellow); ObjectSet("L4tatr line",OBJPROP_WIDTH,1); } else { ObjectMove("L4tatr line", 0,Time[0],L4t); } if(ObjectFind("H4atr label") != 0) { ObjectCreate("H4atr label", OBJ_TEXT, 0, Time[0]+timeshift, H4); ObjectSetText("H4atr label", "ATR(y) res: " + DoubleToStr(H4,4), 8, "Verdana", Yellow); } else { ObjectMove("H4atr label", 0, Time[0]+timeshift, H4); } if(ObjectFind("L4atr label") != 0) { ObjectCreate("L4atr label", OBJ_TEXT, 0, Time[0]+timeshift, L4); ObjectSetText("L4atr label", "ATR(y) sup: " + DoubleToStr(L4,4), 8, "Verdana", Yellow); } else { ObjectMove("L4atr label", 0, Time[0]+timeshift, L4); } if(ObjectFind("H4tatr label") != 0) { ObjectCreate("H4tatr label", OBJ_TEXT, 0, Time[0]+timeshift, H4t); ObjectSetText("H4tatr label", "ATR(t) res: " + DoubleToStr(H4t,4), 8, "Verdana", Yellow); } else { ObjectMove("H4tatr label", 0, Time[0]+timeshift, H4t); } if(ObjectFind("L4tatr label") != 0) { ObjectCreate("L4tatr label", OBJ_TEXT, 0, Time[0]+timeshift, L4t); ObjectSetText("L4tatr label", "ATR(t) sup: " + DoubleToStr(L4t,4), 8, "Verdana", Yellow); } else { ObjectMove("L4tatr label", 0, Time[0]+timeshift, L4t); } return(0); } //+------------------------------------------------------------------+

Indicatore Metatrader - Auto-Pivot Plotter V1-41

Indicatore MetaTrader //+------------------------------------------------------------------+ //| Auto-Pivot Plot ...

Indicatore MetaTrader 
//+------------------------------------------------------------------+ //| Auto-Pivot Plotter V1-41.mq4 | //| Copyright © 2006, Elton Treloar | //| | //+------------------------------------------------------------------+ #property copyright "Copyright © 2006, Elton Treloar" #property link "" #property indicator_chart_window #property indicator_buffers 8 #property indicator_color1 Red #property indicator_color2 Red #property indicator_color3 Red #property indicator_color4 Yellow #property indicator_color5 DodgerBlue #property indicator_color6 DodgerBlue #property indicator_color7 DodgerBlue #property indicator_color8 LimeGreen #property indicator_style1 STYLE_SOLID #property indicator_style2 STYLE_SOLID #property indicator_style3 STYLE_SOLID #property indicator_style4 STYLE_SOLID #property indicator_style5 STYLE_SOLID #property indicator_style6 STYLE_SOLID #property indicator_style7 STYLE_SOLID #property indicator_style8 STYLE_SOLID //---- input parameters extern int StartHour=0; extern int StartMinute=0; extern int DaysToPlot=15; //---- buffers double Res3[]; double Res2[]; double Res1[]; double Pivot[]; double Supp1[]; double Supp2[]; double Supp3[]; double Extra1[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_LINE,STYLE_SOLID); SetIndexBuffer(0,Res3); SetIndexStyle(1,DRAW_LINE,STYLE_SOLID); SetIndexBuffer(1,Res2); SetIndexStyle(2,DRAW_LINE,STYLE_SOLID); SetIndexBuffer(2,Res1); SetIndexStyle(3,DRAW_LINE,STYLE_SOLID,1); SetIndexBuffer(3,Pivot); SetIndexStyle(4,DRAW_LINE,STYLE_SOLID); SetIndexBuffer(4,Supp1); SetIndexStyle(5,DRAW_LINE,STYLE_SOLID); SetIndexBuffer(5,Supp2); SetIndexStyle(6,DRAW_LINE,STYLE_SOLID); SetIndexBuffer(6,Supp3); SetIndexStyle(7,DRAW_LINE,STYLE_SOLID); SetIndexBuffer(7,Extra1); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); if(counted_bars<0) return(-1); //---- last counted bar will be recounted if(counted_bars>0) counted_bars--; int limit=Bars-counted_bars; int StartMinutesIntoDay=(StartHour*60)+StartMinute; // 8' o'clock x 60 = 480 int CloseMinutesIntoDay=StartMinutesIntoDay-Period(); // // **************************************************** // Check That cloes time isn't now a negative number. // Correct if it is by adding a full day's worth // of minutes. // **************************************************** if (CloseMinutesIntoDay<0) { CloseMinutesIntoDay=CloseMinutesIntoDay+1440; } // **************************************************** // Establish the nuber of bars in a day. // **************************************************** int BarsInDay=1440/Period(); // ****************************************************************************************** // ****************************************************************************************** // Main Loop // ****************************************************************************************** // ****************************************************************************************** for(int i=0; i<limit; i++) { // *************************************************************************** // Only do all this if we are within the plotting range we want. // i.e. DaysToPlot // If DaysToPlot is "0" (zero) we plot ALL available data. This can be // VERY slow with a large history and at small time frames. Expect to // wait if plotting a year or more on a say a five minute chart. On my PC // two years of data at Five Minutes takes around 30 seconds per indicator. // i.e. 30 seconds for main pivot levels indicator then another 30 seconds // to plot the seperate mid-levels indicator. // *************************************************************************** if ( (i<((DaysToPlot+1)*BarsInDay))||DaysToPlot==0) // Used to limit the number of days { // that are mapped out. Less waiting ;) // ***************************************************** // Find previous day's opening and closing bars. // ***************************************************** int PreviousClosingBar = FindLastTimeMatchFast(CloseMinutesIntoDay,i+1); int PreviousOpeningBar = FindLastTimeMatchFast(StartMinutesIntoDay,PreviousClosingBar+1); double PreviousHigh= High[PreviousClosingBar]; double PreviousLow = Low [PreviousClosingBar]; double PreviousClose = Close[PreviousClosingBar]; // ***************************************************** // Find previous day's high and low. // ***************************************************** for (int SearchHighLow=PreviousClosingBar;SearchHighLow<(PreviousOpeningBar+1);SearchHighLow++) { if (High[SearchHighLow]>PreviousHigh) PreviousHigh=High[SearchHighLow]; if (Low[SearchHighLow]<PreviousLow) PreviousLow=Low[SearchHighLow]; } // ************************************************************************ // Calculate Pivot lines and map into indicator buffers. // ************************************************************************ double P = (PreviousHigh+PreviousLow+PreviousClose)/3; double R1 = (2*P)-PreviousLow; double S1 = (2*P)-PreviousHigh; double R2 = P+(PreviousHigh - PreviousLow); double S2 = P-(PreviousHigh - PreviousLow); double R3 = (2*P)+(PreviousHigh-(2*PreviousLow)); double S3 = (2*P)-((2* PreviousHigh)-PreviousLow); Pivot[i]=P; Res1[i] =R1; Res2[i] =R2; Res3[i] =R3; Supp1[i]=S1; Supp2[i]=S2; Supp3[i]=S3; // Extra1[i]=OpenPriceAt+i; // ********************************************** // Calculate the mid-levels in to the buffers. // (for mid-levels version) // **********************************************(Twe) // Res1[i] =((R1-P)/2)+P; //M3 // Res2[i] =((R2-R1)/2)+R1; //M4 // Res3[i] =((R3-R2)/2)+R2; // Supp1[i]=((P-S1)/2)+S1; //M2 // Supp2[i]=((S1-S2)/2)+S2; //M1 // Supp3[i]=((S2-S3)/2)+S3; } //End of 'DaysToPlot 'if' statement. } // *************************************************************************************** // End of Main Loop // *************************************************************************************** // ***************************************** // Return from Start() (Main Routine) return(0); } //+-------------------------------------------------------------------------------------------------------+ // END Custom indicator iteration function //+-------------------------------------------------------------------------------------------------------+ // ***************************************************************************************** // ***************************************************************************************** // ----------------------------------------------------------------------------------------- // The following routine will use "StartingBar"'s time and use it to find the // general area that SHOULD contain the bar that matches "TimeToLookFor" // ----------------------------------------------------------------------------------------- int FindLastTimeMatchFast(int TimeToLookFor,int StartingBar) { int StartingBarsTime=(TimeHour(Time[StartingBar])*60)+TimeMinute(Time[StartingBar]); // *************************************************** // Check that our search isn't on the otherside of // the midnight boundary and correct for calculations // *************************************************** if (StartingBarsTime<TimeToLookFor) { StartingBarsTime=StartingBarsTime+1440; } // *************************************************** // Find out where the bar SHOULD be in time. // *************************************************** int HowFarBack=StartingBarsTime-TimeToLookFor; // *************************************************** // Translate that into Bars // *************************************************** int HowManyBarsBack=HowFarBack/Period(); // *************************************************** // We've found our starting point // Calculate it's relative time in minutes. // *************************************************** int SuggestedBar=StartingBar+HowManyBarsBack; int SuggestedBarsTime=(TimeHour(Time[SuggestedBar])*60)+TimeMinute(Time[SuggestedBar]); // *************************************************** // If we have what we're after let's just skip the // crap and return the position of the bar in the // chart to our main routine // *************************************************** if (SuggestedBarsTime==TimeToLookFor) { return(SuggestedBar); } // *************************************************** // Else find the difference in time from where we // were supposed to find the bar. // *************************************************** int DeltaTimeFound=TimeToLookFor-SuggestedBarsTime; int DeltaBarFound=DeltaTimeFound/Period(); // *************************************************** // I'd be worried if Delta was below zero. Would mean // that we have EXTRA bars in that day. Unlikely in // the extreme. // So I'm only checking for the other case. //...now let's search in a narrow range to find that // bar we are after... // *************************************************** if (DeltaTimeFound>0) { for (int SearchCount=SuggestedBar ;SearchCount>(SuggestedBar-DeltaBarFound-2) ;SearchCount--) { // ****************************************************************************** // Find time (in minutes) of the current bar AND the two bars either side of it. // This is done to allow for any missing bars in the data. i.e. If THE bar you // were after were to be missing you'd never get a valid close/open time. // This is the same reason for searching rather than just looking back a certain // number of bars from the close time. Missing bars upset the count back and // screw up all pivot calculations. There is still room for error but it's improved. // The best calculations will come from having the best data....of course. :) // ****************************************************************************** // int PreviousBarsTime=(TimeHour(Time[SearchCount+1])*60)+TimeMinute(Time[SearchCount+1]); int CurrentBarsTime=(TimeHour(Time[SearchCount])*60)+TimeMinute(Time[SearchCount]); int NextBarsTime=(TimeHour(Time[SearchCount-1])*60)+TimeMinute(Time[SearchCount-1]); if (CurrentBarsTime==TimeToLookFor) { return(SearchCount); // *** If current bar is what we are after than lets get out. // *** without mucking about with the rest of the checks. } // ********************************** // Check that previous bar doesn't // lay on a different day. // Adjust if it is // ********************************** if(PreviousBarsTime>CurrentBarsTime) { PreviousBarsTime=PreviousBarsTime-1440; } // ********************************** // Check that following bar doesn't // lay on a different day. // Adjust if it is. // ********************************** if(NextBarsTime<CurrentBarsTime) { NextBarsTime=NextBarsTime+1440; } // ****************************************** // If this is the best we can get // to the actual bar we are after, then // exit, returning current bar number. // ******************************************* if(PreviousBarsTime<TimeToLookFor) { if( TimeToLookFor<NextBarsTime) { return(SearchCount); } } } } return (SuggestedBar); }

Indicatore Metatrader - ATR ratio

Indicatore MetaTrader //+------------------------------------------------------------------+ //| ...

Indicatore MetaTrader 

//+------------------------------------------------------------------+ //| ATR ratio.mq4 | //| Copyright © 2005, Luis Guilherme Damiani | //| http://www.damianifx.com.br | //+------------------------------------------------------------------+ #property copyright "Copyright © 2005, Luis Guilherme Damiani" #property link "http://www.damianifx.com.br" #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 Silver #property indicator_color2 Violet //---- input parameters extern int short_atr=7; extern int long_atr=49; extern double triglevel=1.00; //---- buffers double ExtMapBuffer1[]; double ExtMapBuffer2[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,ExtMapBuffer1); SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1,ExtMapBuffer2); //---- return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); //Comment("ATR ratio= "+short_atr+" / "+long_atr); for(int i=0;i<Bars-counted_bars;i++) { ExtMapBuffer1[i]=triglevel; double sa=iATR(NULL,0,short_atr,i); ExtMapBuffer2[i]= sa/iATR(NULL,0,long_atr,i); } //---- //---- return(0); } //+------------------------------------------------------------------+

Indicatore Metatrader - AutoDayFibs

Indicatore MetaTrader //+------------------------------------------------------------------+ //| Auto ...

Indicatore MetaTrader 

//+------------------------------------------------------------------+ //| AutoDayFibs V1.0 | //| | //| Copyright © 2005, Jason Robinson | //| (jasonrobinsonuk, jnrtrading) | //| http://www.jnrtrading.co.uk | //| | //| Created by jnrtrading | //| | //+------------------------------------------------------------------+ #property copyright "Copyright © 2005, Jason Robinson (jnrtrading)" #property link "http://www.jnrtrading.co.uk" #property indicator_chart_window extern int daysBackForHigh = 1; extern int daysBackForLow = 1; //---- buffers double Rates[][6]; double fib000, fib236, fib382, fib50, fib618, fib100, fib1618, fib2618, fib4236, range, prevRange, high, low; bool objectsExist, highFirst; prevRange = 0; objectsExist = false; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators //prevRange = 0; //objectsExist = false; //---- return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- ObjectDelete("fib000"); ObjectDelete("fib000_label"); ObjectDelete("fib236"); ObjectDelete("fib236_label"); ObjectDelete("fib382"); ObjectDelete("fib382_label"); ObjectDelete("fib50"); ObjectDelete("fib50_label"); ObjectDelete("fib618"); ObjectDelete("fib618_label"); ObjectDelete("fib100"); ObjectDelete("fib100_label"); ObjectDelete("fib1618"); ObjectDelete("fib1618_label"); ObjectDelete("fib2618"); ObjectDelete("fib2618_label"); ObjectDelete("fib4236"); ObjectDelete("fib4236_label"); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int i = 0; //---- //Print(prevRange); ArrayCopyRates(Rates, Symbol(), PERIOD_D1); high = Rates[daysBackForHigh][3]; low = Rates[daysBackForLow][2]; range = high - low; while(true) { if(High[i] == high) { highFirst = true; break; } else if(Low[i] == low) { highFirst = false; break; } i++; } //Print(highFirst); // Delete Objects if necessary if (prevRange != range) { ObjectDelete("fib000"); ObjectDelete("fib000_label"); ObjectDelete("fib236"); ObjectDelete("fib236_label"); ObjectDelete("fib382"); ObjectDelete("fib382_label"); ObjectDelete("fib50"); ObjectDelete("fib50_label"); ObjectDelete("fib618"); ObjectDelete("fib618_label"); ObjectDelete("fib100"); ObjectDelete("fib100_label"); ObjectDelete("fib1618"); ObjectDelete("fib1618_label"); ObjectDelete("fib2618"); ObjectDelete("fib2618_label"); ObjectDelete("fib4236"); ObjectDelete("fib4236_label"); objectsExist = false; prevRange = range; //Print("Objects do not exist"); } if (highFirst == true) { fib000 = low; fib236 = (range * 0.236) + low; fib382 = (range * 0.382) + low; fib50 = (high + low) / 2; fib618 = (range * 0.618) + low; fib100 = high; fib1618 = (range * 0.618) + high; fib2618 = (range * 0.618) + (high + range); fib4236 = (range * 0.236) + high + (range * 3); } else if (highFirst == false) { fib000 = high; fib236 = high - (range * 0.236); fib382 = high - (range * 0.382); fib50 = (high + low) / 2; fib618 = high - (range * 0.618); fib100 = low; fib1618 = low - (range * 0.618); fib2618 = (low - range) - (range * 0.618);// + (high + range); fib4236 = low - (range * 3) - (range * 0.236);// + high + (range * 3); } if (objectsExist == false) { ObjectCreate("fib000", OBJ_HLINE, 0, Time[40], fib000); ObjectSet("fib000", OBJPROP_STYLE, STYLE_DASHDOTDOT); ObjectSet("fib000", OBJPROP_COLOR, Orange); ObjectCreate("fib000_label", OBJ_TEXT, 0, Time[0], fib000); ObjectSetText("fib000_label"," 0.0", 8, "Times", Black); ObjectCreate("fib236", OBJ_HLINE, 0, Time[40], fib236); ObjectSet("fib236", OBJPROP_STYLE, STYLE_DASHDOTDOT); ObjectSet("fib236", OBJPROP_COLOR, Orange); ObjectCreate("fib236_label", OBJ_TEXT, 0, Time[0], fib236); ObjectSetText("fib236_label"," 23.6", 8, "Times", Black); ObjectCreate("fib382", OBJ_HLINE, 0, Time[40], fib382); ObjectSet("fib382", OBJPROP_STYLE, STYLE_DASHDOTDOT); ObjectSet("fib382", OBJPROP_COLOR, Orange); ObjectCreate("fib382_label", OBJ_TEXT, 0, Time[0], fib382); ObjectSetText("fib382_label"," 38.2", 8, "Times", Black); ObjectCreate("fib50", OBJ_HLINE, 0, Time[40], fib50); ObjectSet("fib50", OBJPROP_STYLE, STYLE_DASHDOTDOT); ObjectSet("fib50", OBJPROP_COLOR, Orange); ObjectCreate("fib50_label", OBJ_TEXT, 0, Time[0], fib50); ObjectSetText("fib50_label"," 50.0", 8, "Times", Black); ObjectCreate("fib618", OBJ_HLINE, 0, Time[40], fib618); ObjectSet("fib618", OBJPROP_STYLE, STYLE_DASHDOTDOT); ObjectSet("fib618", OBJPROP_COLOR, Orange); ObjectCreate("fib618_label", OBJ_TEXT, 0, Time[0], fib618); ObjectSetText("fib618_label"," 61.8", 8, "Times", Black); ObjectCreate("fib100", OBJ_HLINE, 0, Time[40], fib100); ObjectSet("fib100", OBJPROP_STYLE, STYLE_DASHDOTDOT); ObjectSet("fib100", OBJPROP_COLOR, Orange); ObjectCreate("fib100_label", OBJ_TEXT, 0, Time[0], fib100); ObjectSetText("fib100_label"," 100.0", 8, "Times", Black); ObjectCreate("fib1618", OBJ_HLINE, 0, Time[40], fib1618); ObjectSet("fib1618", OBJPROP_STYLE, STYLE_DASHDOTDOT); ObjectSet("fib1618", OBJPROP_COLOR, Orange); ObjectCreate("fib1618_label", OBJ_TEXT, 0, Time[0], fib1618); ObjectSetText("fib1618_label"," 161.8", 8, "Times", Black); ObjectCreate("fib2618", OBJ_HLINE, 0, Time[40], fib2618); ObjectSet("fib2618", OBJPROP_STYLE, STYLE_DASHDOTDOT); ObjectSet("fib2618", OBJPROP_COLOR, Orange); ObjectCreate("fib2618_label", OBJ_TEXT, 0, Time[0], fib2618); ObjectSetText("fib2618_label"," 261.8", 8, "Times", Black); ObjectCreate("fib4236", OBJ_HLINE, 0, Time[40], fib4236); ObjectSet("fib4236", OBJPROP_STYLE, STYLE_DASHDOTDOT); ObjectSet("fib4236", OBJPROP_COLOR, Orange); ObjectCreate("fib4236_label", OBJ_TEXT, 0, Time[0], fib4236); ObjectSetText("fib4236_label"," 423.6", 8, "Times", Black); //Print("Objects Exist"); } //---- return(0); } //+------------------------------------------------------------------+

Indicatore Metatrader - ADX

Indicatore MetaTrader  //+------------------------------------------------------------------+ //| ...

Indicatore MetaTrader 


//+------------------------------------------------------------------+ //| ADX.mq4 | //| Copyright © 2004, MetaQuotes Software Corp. | //| http://www.metaquotes.net/ | //+------------------------------------------------------------------+ #property copyright "Copyright © 2004, MetaQuotes Software Corp." #property link "http://www.metaquotes.net/" #property indicator_separate_window #property indicator_buffers 3 #property indicator_color1 Blue #property indicator_color2 Green #property indicator_color3 Red //---- input parameters extern int ADXPeriod=14; //---- buffers double ADXBuffer[]; double PlusDiBuffer[]; double MinusDiBuffer[]; double PlusSdiBuffer[]; double MinusSdiBuffer[]; double TempBuffer[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- 3 additional buffers are used for counting. IndicatorBuffers(6); //---- indicator buffers SetIndexBuffer(0,ADXBuffer); SetIndexBuffer(1,PlusDiBuffer); SetIndexBuffer(2,MinusDiBuffer); SetIndexBuffer(3,PlusSdiBuffer); SetIndexBuffer(4,MinusSdiBuffer); SetIndexBuffer(5,TempBuffer); //---- name for DataWindow and indicator subwindow label IndicatorShortName("ADX("+ADXPeriod+")"); SetIndexLabel(0,"ADX"); SetIndexLabel(1,"+DI"); SetIndexLabel(2,"-DI"); //---- SetIndexDrawBegin(0,ADXPeriod); SetIndexDrawBegin(1,ADXPeriod); SetIndexDrawBegin(2,ADXPeriod); //---- return(0); } //+------------------------------------------------------------------+ //| Average Directional Movement Index | //+------------------------------------------------------------------+ int start() { double pdm,mdm,tr; double price_high,price_low; int starti,i,counted_bars=IndicatorCounted(); //---- i=Bars-2; PlusSdiBuffer[i+1]=0; MinusSdiBuffer[i+1]=0; if(counted_bars>=i) i=Bars-counted_bars-1; starti=i; //---- while(i>=0) { price_low=Low[i]; price_high=High[i]; //---- pdm=price_high-High[i+1]; mdm=Low[i+1]-price_low; if(pdm<0) pdm=0; // +DM if(mdm<0) mdm=0; // -DM if(pdm==mdm) { pdm=0; mdm=0; } else if(pdm<mdm) pdm=0; else if(mdm<pdm) mdm=0; //---- âû÷èñëÿåì èñòèííûé èíòåðâàë double num1=MathAbs(price_high-price_low); double num2=MathAbs(price_high-Close[i+1]); double num3=MathAbs(price_low-Close[i+1]); tr=MathMax(num1,num2); tr=MathMax(tr,num3); //---- counting plus/minus direction if(tr==0) { PlusSdiBuffer[i]=0; MinusSdiBuffer[i]=0; } else { PlusSdiBuffer[i]=100.0*pdm/tr; MinusSdiBuffer[i]=100.0*mdm/tr; } //---- i--; } //---- last counted bar will be recounted if(counted_bars>0) counted_bars--; int limit=Bars-counted_bars; //---- apply EMA to +DI for(i=0; i<=limit; i++) PlusDiBuffer[i]=iMAOnArray(PlusSdiBuffer,Bars,ADXPeriod,0,MODE_EMA,i); //---- apply EMA to -DI for(i=0; i<=limit; i++) MinusDiBuffer[i]=iMAOnArray(MinusSdiBuffer,Bars,ADXPeriod,0,MODE_EMA,i); //---- Directional Movement (DX) i=Bars-2; TempBuffer[i+1]=0; i=starti; while(i>=0) { double div=MathAbs(PlusDiBuffer[i]+MinusDiBuffer[i]); if(div==0.00) TempBuffer[i]=0; else TempBuffer[i]=100*(MathAbs(PlusDiBuffer[i]-MinusDiBuffer[i])/div); i--; } //---- ADX is exponential moving average on DX for(i=0; i<limit; i++) ADXBuffer[i]=iMAOnArray(TempBuffer,Bars,ADXPeriod,0,MODE_EMA,i); //---- return(0); } //+------------------------------------------------------------------+

Indicatore Metatrader - AltrTrend_Signal_v2_2

Indicatore Metatrader - AltrTrend_Signal_v2_2//+------------------------------------------------------------------+ //| AltrTrend_Signal_v2_2.mq4 / ...

Indicatore Metatrader - AltrTrend_Signal_v2_2


//+------------------------------------------------------------------+ //| AltrTrend_Signal_v2_2.mq4 //| Ramdass - Conversion only //+------------------------------------------------------------------+ #property copyright "Author - OlegVS, GOODMAN" #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Green #property indicator_color2 Crimson //---- input parameters extern int K=30; extern double Kstop=0.5; extern int Kperiod=150; extern int PerADX=14; extern int CountBars=350; //---- buffers double val1[]; double val2[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { string short_name; //---- indicator line IndicatorBuffers(2); SetIndexStyle(0,DRAW_ARROW); SetIndexArrow(0,108); SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1,108); SetIndexBuffer(0,val1); SetIndexBuffer(1,val2); //---- return(0); } //+------------------------------------------------------------------+ //| AltrTrend_Signal_v2_2 | //+------------------------------------------------------------------+ int start() { if (CountBars>=Bars) CountBars=Bars; SetIndexDrawBegin(0,Bars-CountBars+PerADX); SetIndexDrawBegin(1,Bars-CountBars+PerADX); int i,shift,counted_bars=IndicatorCounted(); int i1,i2; double Range,AvgRange,smin,smax,SsMax,SsMin,SSP,price; bool uptrend,old; //---- if(Bars<=PerADX+1) return(0); //---- initial zero if(counted_bars<PerADX+1) { for(i=1;i<=PerADX;i++) val1[CountBars-i]=0.0; for(i=1;i<=PerADX;i++) val2[CountBars-i]=0.0; } //---- for (shift = CountBars-PerADX; shift>=0; shift--) { SSP=MathCeil(Kperiod/iADX(NULL,0,PerADX,PRICE_CLOSE,MODE_MAIN,1)); Range=0; AvgRange=0; for (i1=shift; i1<=shift+SSP; i1++) {AvgRange=AvgRange+MathAbs(High[i1]-Low[i1]); } Range=AvgRange/(SSP+1); SsMax=High[shift]; SsMin=Low[shift]; for (i2=shift;i2<=shift+SSP-1;i2++) { price=High[i2]; if(SsMax<price) SsMax=price; price=Low[i2]; if(SsMin>=price) SsMin=price; } smin = SsMin+(SsMax-SsMin)*K/100; smax = SsMax-(SsMax-SsMin)*K/100; val1[shift]=0; val2[shift]=0; if (Close[shift]<smin) { uptrend = false; } if (Close[shift]>smax) { uptrend = true; } if (uptrend!=old && uptrend==true) {val1[shift]=Low[shift]-Range*Kstop;} if (uptrend!=old && uptrend==false) {val2[shift]=High[shift]+Range*Kstop;} old=uptrend; } return(0); } //+------------------------------------------------------------------+

Indicatore Metatrader - ATR Channels

Qui di seguito potete vedere il codice dell'indicatore di Metatrader.//+------------------------------------------------------------------+ //| ...

Qui di seguito potete vedere il codice dell'indicatore di Metatrader.



//+------------------------------------------------------------------+ //| ATR Channels.mq4 | //| Copyright © 2005, Luis Guilherme Damiani | //| http://www.damianifx.com.br | //+------------------------------------------------------------------+ #property copyright "Copyright © 2005, Luis Guilherme Damiani" #property link "http://www.damianifx.com.br" #property indicator_chart_window #property indicator_buffers 7 #property indicator_color1 Aqua //Moving Average #property indicator_color2 DeepSkyBlue // Lower band 1 #property indicator_color3 DeepSkyBlue // Upper band 1 #property indicator_color4 RoyalBlue // Lower band 2 #property indicator_color5 RoyalBlue // Upper band 2 #property indicator_color6 BlueViolet // Lower band 3 #property indicator_color7 BlueViolet // Upper band 3 //---- indicator buffers double MA_Buffer0[]; double Ch1up_Buffer1[]; double Ch1dn_Buffer2[]; double Ch2up_Buffer3[]; double Ch2dn_Buffer4[]; double Ch3up_Buffer5[]; double Ch3dn_Buffer6[]; //---- input parameters extern int PeriodsATR=18; extern int MA_Periods=49; extern int MA_type=MODE_LWMA; extern double Mult_Factor1= 1.6; extern double Mult_Factor2= 3.2; extern double Mult_Factor3= 4.8; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { string mat; //---7- indicators // MA SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,MA_Buffer0); SetIndexDrawBegin(0,0); /*if (MA_type==MODE_LWMA)SetIndexLabel(0,"WMA"+MA_Periods) else { if (MA_type==MODE_SMA) SetIndexLabel(0,"SMA"+MA_Periods) else { if (MA_type==MODE_EMA) SetIndexLabel(0,"EMA"+MA_Periods) else SetIndexLabel(0,"SMMA"+MA_Periods); }; };*/ // ATR 1 up SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1,Ch1up_Buffer1); SetIndexDrawBegin(1,0); SetIndexLabel(1,"ATRu "+PeriodsATR+", "+Mult_Factor1); // ATR 1 down SetIndexStyle(2,DRAW_LINE); SetIndexBuffer(2,Ch1dn_Buffer2); SetIndexDrawBegin(2,0); SetIndexLabel(2,"ATRd "+PeriodsATR+", "+Mult_Factor1); // ATR 2 up SetIndexStyle(3,DRAW_LINE); SetIndexBuffer(3,Ch2up_Buffer3); SetIndexDrawBegin(3,0); SetIndexLabel(3,"ATRu "+PeriodsATR+", "+Mult_Factor2); // ATR 2 down SetIndexStyle(4,DRAW_LINE); SetIndexBuffer(4,Ch2dn_Buffer4); SetIndexDrawBegin(4,0); SetIndexLabel(4,"ATRd "+PeriodsATR+", "+Mult_Factor2); // ATR 3 up SetIndexStyle(5,DRAW_LINE); SetIndexBuffer(5,Ch3up_Buffer5); SetIndexDrawBegin(5,0); SetIndexLabel(5,"ATRu "+PeriodsATR+", "+Mult_Factor3); // ATR 3 down SetIndexStyle(6,DRAW_LINE); SetIndexBuffer(6,Ch3dn_Buffer6); SetIndexDrawBegin(6,0); SetIndexLabel(6,"ATRd "+PeriodsATR+", "+Mult_Factor3); //---- return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() {//---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int fixed_bars=IndicatorCounted(); for(int i=0;i< Bars - fixed_bars;i++) { double atr=iATR(NULL,0,PeriodsATR,i); double ma=iMA(NULL,0,MA_Periods,0,MA_type,PRICE_TYPICAL,i); MA_Buffer0[i]=ma; Ch1up_Buffer1[i]=ma+atr*Mult_Factor1; Ch1dn_Buffer2[i]=ma-atr*Mult_Factor1; Ch2up_Buffer3[i]=ma+atr*Mult_Factor2; Ch2dn_Buffer4[i]=ma-atr*Mult_Factor2; Ch3up_Buffer5[i]=ma+atr*Mult_Factor3; Ch3dn_Buffer6[i]=ma-atr*Mult_Factor3; } //---- //---- return(0); }

Indicatore Metatrader - ATR Levels New

Indicatore MetaTrader //+------------------------------------------------------------------+ //| ATR L ...

Indicatore MetaTrader 

//+------------------------------------------------------------------+ //| ATR Levels New.mq4 | //| Tamir Bleicher | //+------------------------------------------------------------------+ #property copyright "Tamir Bleicher" #property indicator_chart_window extern int ATRPeriod = 10; extern string TimeFrame = "D"; extern bool IgnoreSunday = true; extern int MinVolume = 1; extern color DynamicLevel = Teal; extern color StaticLevel=Indigo; extern color OpenLevel=Navy; extern int LevelBarDisplay=40; extern string Remark1 = "=========================================================================="; extern string Remark2 = "TimeFrames: MN-Monthly W-Weekly D-Daily H4-4 Hours H1- 1 Hour M30-30 Minutes M15-15 Minutes M5-5 Minutes M1-1 Minute =="; extern string Remark3 = "IgnoreSunday is relevant only for Daily levels"; extern string Remark4 = "MinVolue is the minimum volume to take in ATR calculation in order to skip holidays"; extern string Remark5 = "LevelBarDisplay is the line titles and value position in bars, counting backward from the last bar"; extern string Remark6 = "Levels are: Dynamic levels (support and resist), Static Levels (support and resist) and open period level"; double rates_d1[][6]; double Static_Resist, Dynamic_Resist, Static_Support, Dynamic_Support, atr; int periods, TF; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators //---- if (TimeFrame=="MN" || TimeFrame=="mn" || TimeFrame=="M" || TimeFrame=="m") TF=PERIOD_MN1; else if (TimeFrame=="W" || TimeFrame=="w") TF=PERIOD_W1; else if (TimeFrame=="D" || TimeFrame=="d") TF=PERIOD_D1; else if (TimeFrame=="H4" || TimeFrame=="h4") TF=PERIOD_H4; else if (TimeFrame=="H1" || TimeFrame=="h1") TF=PERIOD_H1; else if (TimeFrame=="M30" || TimeFrame=="m30") TF=PERIOD_M30; else if (TimeFrame=="M15" || TimeFrame=="m15") TF=PERIOD_M15; else if (TimeFrame=="M5" || TimeFrame=="m5") TF=PERIOD_M5; else if (TimeFrame=="M1" || TimeFrame=="m1") TF=PERIOD_M1; else TF=PERIOD_D1; return(0); } int deinit() { ObjectDelete("ATR Static Resist"); ObjectDelete("ATR Static Support"); ObjectDelete("ATR Static Support Label"); ObjectDelete("ATR Static Resist Label"); ObjectDelete("Period Open"); ObjectDelete("ATR Dynamic Resist"); ObjectDelete("ATR Dynamic Support"); ObjectDelete("ATR Dynamic Support Label"); ObjectDelete("ATR Dynamic Resist Label"); ObjectDelete("Period Open Label"); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); string Remark; int Yesterday; ArrayCopyRates(rates_d1, Symbol(), TF); atr = ATR(Symbol(), TF, ATRPeriod, 1, IgnoreSunday); switch(TF) { case PERIOD_MN1: Remark="(Monthly)"; break; case PERIOD_W1: Remark="(Weekly)"; break; case PERIOD_D1: if (IgnoreSunday) Remark="(Daily ignoring Sundays)"; else Remark="(Daily including Sundays)"; break; case PERIOD_H4: Remark="(4 Hours)"; break; case PERIOD_H1: Remark="(1 Hour)"; break; case PERIOD_M30: Remark="(30 Minutes)"; break; case PERIOD_M15: Remark="(15 Minutes)"; break; case PERIOD_M5: Remark="(5 Minutes)"; break; case PERIOD_M1: Remark="(1 Minute)"; break; } Comment("ATR (",ATRPeriod,") = ",atr," ",Remark); if (TF==PERIOD_D1 && IgnoreSunday && TimeDayOfWeek(iTime(NULL,TF,1))==0) Yesterday=2; else Yesterday=1; Static_Support = rates_d1[Yesterday][3] - atr; Static_Resist = rates_d1[Yesterday][2] + atr; Dynamic_Support = rates_d1[0][3] - atr; Dynamic_Resist = rates_d1[0][2] + atr; if (ObjectFind("ATR Static Resist") != 0) { ObjectCreate("ATR Static Resist",OBJ_HLINE,0,Time[0],Static_Resist); ObjectSet("ATR Static Resist",OBJPROP_COLOR,StaticLevel); ObjectSet("ATR Static Resist",OBJPROP_WIDTH,1); } else { ObjectMove("ATR Static Resist", 0,Time[0],Static_Resist); } if (ObjectFind("ATR Static Support") != 0) { ObjectCreate("ATR Static Support",OBJ_HLINE,0,Time[0],Static_Support); ObjectSet("ATR Static Support",OBJPROP_COLOR,StaticLevel); ObjectSet("ATR Static Support",OBJPROP_WIDTH,1); } else { ObjectMove("ATR Static Support", 0,Time[0],Static_Support); } if (ObjectFind("ATR Dynamic Resist") != 0) { ObjectCreate("ATR Dynamic Resist",OBJ_HLINE,0,Time[0],Dynamic_Resist); ObjectSet("ATR Dynamic Resist",OBJPROP_COLOR,DynamicLevel); ObjectSet("ATR Dynamic Resist",OBJPROP_WIDTH,1); } else { ObjectMove("ATR Dynamic Resist", 0,Time[0],Dynamic_Resist); } if (ObjectFind("ATR Dynamic Support") != 0) { ObjectCreate("ATR Dynamic Support",OBJ_HLINE,0,Time[0],Dynamic_Support); ObjectSet("ATR Dynamic Support",OBJPROP_COLOR,DynamicLevel); ObjectSet("ATR Dynamic Support",OBJPROP_WIDTH,1); } else { ObjectMove("ATR Dynamic Support", 0,Time[0],Dynamic_Support); } if (ObjectFind("Period Open") != 0) { ObjectCreate("Period Open",OBJ_HLINE,0,Time[LevelBarDisplay],iOpen(0,TF,0)); ObjectSet("Period Open",OBJPROP_COLOR,OpenLevel); ObjectSet("Period Open",OBJPROP_STYLE,STYLE_DOT); } else { ObjectMove("Period Open", 0,Time[LevelBarDisplay],iOpen(0,TF,0)); } if(ObjectFind("ATR Static Resist Label") != 0) { ObjectCreate("ATR Static Resist Label", OBJ_TEXT, 0, Time[LevelBarDisplay], Static_Resist); ObjectSetText("ATR Static Resist Label", "ATR Static res: " + DoubleToStr(Static_Resist,4), 8, "Verdana", Black); } else { ObjectMove("ATR Static Resist Label", 0, Time[LevelBarDisplay], Static_Resist); } if(ObjectFind("ATR Static Support Label") != 0) { ObjectCreate("ATR Static Support Label", OBJ_TEXT, 0, Time[LevelBarDisplay], Static_Support); ObjectSetText("ATR Static Support Label", "ATR Static sup: " + DoubleToStr(Static_Support,4), 8, "Verdana", Black); } else { ObjectMove("ATR Static Support Label", 0, Time[LevelBarDisplay], Static_Support); } if(ObjectFind("ATR Dynamic Resist Label") != 0) { ObjectCreate("ATR Dynamic Resist Label", OBJ_TEXT, 0, Time[LevelBarDisplay], Dynamic_Resist); ObjectSetText("ATR Dynamic Resist Label", "ATR Dynamic res: " + DoubleToStr(Dynamic_Resist,4), 8, "Verdana", Black); } else { ObjectMove("ATR Dynamic Resist Label", 0, Time[LevelBarDisplay], Dynamic_Resist); } if(ObjectFind("ATR Dynamic Support Label") != 0) { ObjectCreate("ATR Dynamic Support Label", OBJ_TEXT, 0, Time[LevelBarDisplay], Dynamic_Support); ObjectSetText("ATR Dynamic Support Label", "ATR Dynamic sup: " + DoubleToStr(Dynamic_Support,4), 8, "Verdana", Black); } else { ObjectMove("ATR Dynamic Support Label", 0, Time[LevelBarDisplay], Dynamic_Support); } if(ObjectFind("Period Open Label") != 0) { ObjectCreate("Period Open Label", OBJ_TEXT, 0, Time[LevelBarDisplay], iOpen(0,TF,0)); ObjectSetText("Period Open Label", "Period Open: " + DoubleToStr(iOpen(0,TF,0),4), 8, "Verdana", Black); } else { ObjectMove("Period Open Label", 0, Time[LevelBarDisplay], iOpen(0,TF,0)); } return(0); } //+------------------------------------------------------------------+ double ATR(string Sym, int TimeFrame, int Per, int Shift, bool Sunday_FLG) { int i,j, Today_DOW,Yesterday_DOW; double h,l,c,tr,tr_sum=0; bool Sunday_Case; if (TimeFrame!=PERIOD_D1 || Sunday_FLG==false) return(iATR(Sym, TimeFrame, Per, Shift)); else for (i=0, j=0; i<Per; i++, j++) { while(iVolume(Sym,TimeFrame,Shift+j)<=MinVolume) j++; Today_DOW=TimeDayOfWeek(iTime(Sym,TimeFrame,Shift+j)); Yesterday_DOW=TimeDayOfWeek(iTime(Sym,TimeFrame,Shift+j+1)); if (Today_DOW==1 && Yesterday_DOW==0) { Sunday_Case=true; c=iClose(Sym,TimeFrame,Shift+j+2); h=MathMax(iHigh(Sym,TimeFrame,Shift+j),iHigh(Sym,TimeFrame,Shift+j+1)); l=MathMin(iLow(Sym,TimeFrame,Shift+j),iLow(Sym,TimeFrame,Shift+j+1)); } else { Sunday_Case=false; c=iClose(Sym,TimeFrame,Shift+j+1); h=iHigh(Sym,TimeFrame,Shift+j); l=iLow(Sym,TimeFrame,Shift+j); } if (c>h) tr=c-l; else if(c<l) tr=h-c; else tr=h-l; tr_sum=tr_sum+tr; // Ignore days with no volume if (Sunday_Case) j++; } return(tr_sum/Per); }

Indicatore Metatrader - Avg Daily Range

Indicatore MetaTrader //+------------------------------------------------------------------+ //| Avg Da ...

Indicatore MetaTrader 

//+------------------------------------------------------------------+ //| Avg Daily Range.mq4 | //| Copyright © 2005, tageiger aka Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. | //| http://www.metatrader.org | //+------------------------------------------------------------------+ #property copyright "Copyright © 2005, tageiger aka Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo." #property link "http://www.metatrader.org" #property indicator_chart_window #property indicator_buffers 3 #property indicator_color1 Yellow #property indicator_color2 SpringGreen #property indicator_color3 Tomato //---- buffers double ExtMapBuffer1[]; double ExtMapBuffer2[]; double ExtMapBuffer3[]; double rng,sum.rng,avg.rng; int init() { //---- indicators SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,ExtMapBuffer1); SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1,ExtMapBuffer2); SetIndexStyle(2,DRAW_LINE); SetIndexBuffer(2,ExtMapBuffer3); //---- return(0);} int deinit() {return(0);} int start() { int counted_bars=IndicatorCounted(); rng=0;sum.rng=0;avg.rng=0; for(int i=0;i<Bars;i++) { rng=(iHigh(Symbol(),Period(),i)-iLow(Symbol(),Period(),i)); sum.rng+=rng; } int db=iBars(Symbol(),Period()); avg.rng=sum.rng/db; // for(int t=0;t<db;t++) { for(int s=0;s<Bars;s++) { ExtMapBuffer2[s]=(iOpen(Symbol(),Period(),s)+(avg.rng/2)); ExtMapBuffer3[s]=(iOpen(Symbol(),Period(),s)-(avg.rng/2)); }// } Comment("Last Tick: ",TimeToStr(CurTime(),TIME_DATE|TIME_SECONDS),"\n", "Sum of Period Ranges:",sum.rng,"\n", "Average Range:",avg.rng,"\n", "Total Bars:",i+1); return(0);} //+------------------------------------------------------------------+

Indicatore Metatrader - Avg Daily Range

Indicatore MetaTrader //+------------------------------------------------------------------+ //| Avg Da ...

Indicatore MetaTrader 

//+------------------------------------------------------------------+ //| Avg Daily Range.mq4 | //| Copyright © 2005, tageiger aka Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. | //| http://www.metatrader.org | //+------------------------------------------------------------------+ #property copyright "Copyright © 2005, tageiger aka Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo." #property link "http://www.metatrader.org" #property indicator_chart_window #property indicator_buffers 3 #property indicator_color1 Yellow #property indicator_color2 SpringGreen #property indicator_color3 Tomato //---- buffers double ExtMapBuffer1[]; double ExtMapBuffer2[]; double ExtMapBuffer3[]; double rng,sum.rng,avg.rng; int init() { //---- indicators SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,ExtMapBuffer1); SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1,ExtMapBuffer2); SetIndexStyle(2,DRAW_LINE); SetIndexBuffer(2,ExtMapBuffer3); //---- return(0);} int deinit() {return(0);} int start() { int counted_bars=IndicatorCounted(); rng=0;sum.rng=0;avg.rng=0; for(int i=0;i<Bars;i++) { rng=(iHigh(Symbol(),Period(),i)-iLow(Symbol(),Period(),i)); sum.rng+=rng; } int db=iBars(Symbol(),Period()); avg.rng=sum.rng/db; // for(int t=0;t<db;t++) { for(int s=0;s<Bars;s++) { ExtMapBuffer2[s]=(iOpen(Symbol(),Period(),s)+(avg.rng/2)); ExtMapBuffer3[s]=(iOpen(Symbol(),Period(),s)-(avg.rng/2)); }// } Comment("Last Tick: ",TimeToStr(CurTime(),TIME_DATE|TIME_SECONDS),"\n", "Sum of Period Ranges:",sum.rng,"\n", "Average Range:",avg.rng,"\n", "Total Bars:",i+1); return(0);} //+------------------------------------------------------------------+

Indicatore Metatrader - BAR Trend

Indicatore MetaTrader //+------------------------------------------------------------------+ //| He ...

Indicatore MetaTrader 

//+------------------------------------------------------------------+ //| Heiken Ashi.mq4 | //| Copyright c 2004, MetaQuotes Software Corp. | //| http://www.metaquotes.net //| Personalized by iGoR for the Trend Slope Trading method (T_S_T) //| Link: http://www.strategybuilderfx.com/forums/showthread.php?t=16507 //| contact: Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. //+------------------------------------------------------------------+ //| For Heiken Ashi we recommend next chart settings ( press F8 or | //| select on menu 'Charts'->'Properties...'): | //| - On 'Color' Tab select 'Black' for 'Line Graph' | //| - On 'Common' Tab disable 'Chart on Foreground' checkbox and | //| select 'Line Chart' radiobutton | //+------------------------------------------------------------------+ #property copyright "Copyright © 2004, MetaQuotes Software Corp." #property link "http://www.metaquotes.net" #property indicator_chart_window #property indicator_buffers 4 #property indicator_color1 DimGray #property indicator_color2 DarkGray #property indicator_color3 DimGray #property indicator_color4 DarkGray //---- buffers double ExtMapBuffer1[]; double ExtMapBuffer2[]; double ExtMapBuffer3[]; double ExtMapBuffer4[]; //---- int ExtCountedBars=0; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //|------------------------------------------------------------------| int init() { //---- indicators SetIndexStyle(0,DRAW_HISTOGRAM, 0, 1, Purple); SetIndexBuffer(0, ExtMapBuffer1); SetIndexStyle(1,DRAW_HISTOGRAM, 0, 1, DarkGreen); SetIndexBuffer(1, ExtMapBuffer2); SetIndexStyle(2,DRAW_HISTOGRAM, 0, 3, Purple); SetIndexBuffer(2, ExtMapBuffer3); SetIndexStyle(3,DRAW_HISTOGRAM, 0, 3, DarkGreen); SetIndexBuffer(3, ExtMapBuffer4); //---- SetIndexDrawBegin(0,10); SetIndexDrawBegin(1,10); SetIndexDrawBegin(2,10); SetIndexDrawBegin(3,10); //---- indicator buffers mapping SetIndexBuffer(0,ExtMapBuffer1); SetIndexBuffer(1,ExtMapBuffer2); SetIndexBuffer(2,ExtMapBuffer3); SetIndexBuffer(3,ExtMapBuffer4); //---- initialization done return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- TODO: add your code here //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { double haOpen, haHigh, haLow, haClose; if(Bars<=10) return(0); ExtCountedBars=IndicatorCounted(); //---- check for possible errors if (ExtCountedBars<0) return(-1); //---- last counted bar will be recounted if (ExtCountedBars>0) ExtCountedBars--; int pos=Bars-ExtCountedBars-1; while(pos>=0) { haOpen=(ExtMapBuffer3[pos+1]+ExtMapBuffer4[pos+1])/2; haClose=(Open[pos]+High[pos]+Low[pos]+Close[pos])/4; haHigh=MathMax(High[pos], MathMax(haOpen, haClose)); haLow=MathMin(Low[pos], MathMin(haOpen, haClose)); if (haOpen<haClose) { ExtMapBuffer1[pos]=haLow; ExtMapBuffer2[pos]=haHigh; } else { ExtMapBuffer1[pos]=haHigh; ExtMapBuffer2[pos]=haLow; } ExtMapBuffer3[pos]=haOpen; ExtMapBuffer4[pos]=haClose; pos--; } //---- return(0); } //+------------------------------------------------------------------+

Indicatore Metatrader - Big Trend

Indicatore MetaTrader //+------------------------------------------------------------------+ //| HMA.mq4 //| Copyright © 2006 WizardSerg <Que ...

Indicatore MetaTrader 

//+------------------------------------------------------------------+ //| HMA.mq4 //| Copyright © 2006 WizardSerg <Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo.>, ?? ??????? ForexMagazine #104 //| Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. //| Revised by IgorAD,Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. | //| Personalized by iGoR AKA FXiGoR for the Trend Slope Trading method (T_S_T) //| Link: //| contact: Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. //+------------------------------------------------------------------+ #property copyright "MT4 release WizardSerg <Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo.>, ?? ??????? ForexMagazine #104" #property link "Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo." #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 LightBlue #property indicator_color2 Tomato //---- input parameters extern int period=80; extern int method=3; // MODE_SMA extern int price=0; // PRICE_CLOSE //---- buffers double Uptrend[]; double Dntrend[]; double ExtMapBuffer[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { IndicatorBuffers(3); SetIndexBuffer(0, Uptrend); //ArraySetAsSeries(Uptrend, true); SetIndexBuffer(1, Dntrend); //ArraySetAsSeries(Dntrend, true); SetIndexBuffer(2, ExtMapBuffer); ArraySetAsSeries(ExtMapBuffer, true); SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2); SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,2); IndicatorShortName("Slope Direction Line("+period+")"); return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { // ???? ????? ?????? ?????? return(0); } //+------------------------------------------------------------------+ //| ?????????? ??????? | //+------------------------------------------------------------------+ double WMA(int x, int p) { return(iMA(NULL, 0, p, 0, method, price, x)); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars = IndicatorCounted(); if(counted_bars < 0) return(-1); int x = 0; int p = MathSqrt(period); int e = Bars - counted_bars + period + 1; double vect[], trend[]; if(e > Bars) e = Bars; ArrayResize(vect, e); ArraySetAsSeries(vect, true); ArrayResize(trend, e); ArraySetAsSeries(trend, true); for(x = 0; x < e; x++) { vect[x] = 2*WMA(x, period/2) - WMA(x, period); // Print("Bar date/time: ", TimeToStr(Time[x]), " close: ", Close[x], " vect[", x, "] = ", vect[x], " 2*WMA(p/2) = ", 2*WMA(x, period/2), " WMA(p) = ", WMA(x, period)); } for(x = 0; x < e-period; x++) ExtMapBuffer[x] = iMAOnArray(vect, 0, p, 0, method, x); for(x = e-period; x >= 0; x--) { trend[x] = trend[x+1]; if (ExtMapBuffer[x]> ExtMapBuffer[x+1]) trend[x] =1; if (ExtMapBuffer[x]< ExtMapBuffer[x+1]) trend[x] =-1; if (trend[x]>0) { Uptrend[x] = ExtMapBuffer[x]; if (trend[x+1]<0) Uptrend[x+1]=ExtMapBuffer[x+1]; Dntrend[x] = EMPTY_VALUE; } else if (trend[x]<0) { Dntrend[x] = ExtMapBuffer[x]; if (trend[x+1]>0) Dntrend[x+1]=ExtMapBuffer[x+1]; Uptrend[x] = EMPTY_VALUE; } //Print( " trend=",trend[x]); } return(0); } //+------------------------------------------------------------------+

Indicatore Metatrader - Daily Range Calculator

Indicatore MetaTrader //+------------------------------------------------------------------+ //| (T_S_R)-Daily Range Calcul ...

Indicatore MetaTrader 

//+------------------------------------------------------------------+ //| (T_S_R)-Daily Range Calculator v1.3.mq4 | //| Copyright © 2006, Ogeima | //| Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. //|Made for the TSR (Trend Slope Retracement) system by FXiGoR | //|http://strategybuilderfx.com/showthread.php?t=17252 | //+------------------------------------------------------------------+ // For basic explanations, see the notes at the end this script. // For information regarding the T_S_R method, read the "FXiGoR-(T_S_R) very effective Trend Slope Retracement system" thread opened by iGoR at StrategyBuilderfx, Forex-tsd, MoneyTec, ForexFactory or Trade2Win. #property copyright "Copyright © 2006, Ogeima" #property link "Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo." #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Green #property indicator_color2 Red //---- input parameters extern double Risk_to_Reward_ratio = 3.0; double aSL_Long[]; double aSL_Short[]; int nDigits; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { IndicatorBuffers(2); SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,3); SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,3); SetIndexBuffer(0,aSL_Long); SetIndexBuffer(1,aSL_Short); SetIndexEmptyValue(0,EMPTY_VALUE); SetIndexEmptyValue(1,EMPTY_VALUE); if(Symbol()=="GBPJPY" || Symbol()=="EURJPY" || Symbol()=="USDJPY" || Symbol()=="CHFJPY" || Symbol()=="GOLD" || Symbol()=="_SP500") nDigits = 2; else nDigits = 4; return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { Comment(""); return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int R1=0,R5=0,R10=0,R20=0,RAvg=0; int RoomUp=0,RoomDown=0,StopLoss_Long=0,StopLoss_Short=0; double SL_Long=0,SL_Short=0; double low0=0,high0=0; string Text=""; int i=0; R1 = (iHigh(NULL,PERIOD_D1,1)-iLow(NULL,PERIOD_D1,1))/Point; for(i=1;i<=5;i++) R5 = R5 + (iHigh(NULL,PERIOD_D1,i)-iLow(NULL,PERIOD_D1,i))/Point; for(i=1;i<=10;i++) R10 = R10 + (iHigh(NULL,PERIOD_D1,i)-iLow(NULL,PERIOD_D1,i))/Point; for(i=1;i<=20;i++) R20 = R20 + (iHigh(NULL,PERIOD_D1,i)-iLow(NULL,PERIOD_D1,i))/Point; R5 = R5/5; R10 = R10/10; R20 = R20/20; RAvg = (R5+R10+R20)/3; low0 = iLow(NULL,PERIOD_D1,0); high0 = iHigh(NULL,PERIOD_D1,0); RoomUp = RAvg - (Bid - low0)/Point; RoomDown = RAvg - (high0 - Bid)/Point; StopLoss_Long = RoomUp/Risk_to_Reward_ratio; SL_Long = Bid - StopLoss_Long*Point; StopLoss_Short = RoomDown/Risk_to_Reward_ratio; SL_Short = Bid + StopLoss_Short*Point; Text = "Average Day Range: " + RAvg + "\n" + "Prev 01 Day Range: " + R1 + "\n" + "Prev 05 Days Range: " + R5 + "\n" + "Prev 10 Days Range: " + R10 + "\n" + "Prev 20 Days Range: " + R20 + "\n"; Text = Text + "Room Up: " + RoomUp + "\n" + "Room Down: " + RoomDown + "\n" + "Max. StopLosses should be :" + "\n" + "Long: " + StopLoss_Long + " Pips at " + DoubleToStr(SL_Long,nDigits) + "\n" + "Short: " + StopLoss_Short + " Pips at " + DoubleToStr(SL_Short,nDigits) + "\n"; Comment(Text); //-- SL Lines int limit; int counted_bars=IndicatorCounted(); if(counted_bars<0) counted_bars=0; if(counted_bars>0) counted_bars--; limit = counted_bars; for(i = 0 ;i <= limit ;i++) { if(i==0 || i==1 || i==2) { aSL_Long[i] = SL_Long; aSL_Short[i]= SL_Short; } else { aSL_Long[i] = EMPTY_VALUE; aSL_Short[i]= EMPTY_VALUE; } } return(0); } //+------------------------------------------------------------------+ /* Here's a little "indicator" that does some basic calculations for us. Let's look at what it does: It computes yesterday's range, the previous 5, 10 and 20 days ranges. And it calculates the "Average Day Range" of these four ranges (yesterday's+ Prev 5 Day Range + Prev 10 Day Range + Prev 20 Day Range)/4. So, if yesterday's Day Range was 80, the Previous 5 Day Range was 110, the Previous 10 Day Range was 90 and the Previous 20 Day Range was 120, then the Average Day Range would be 100. Then there's "Room Up" and "Room Down". Let's imagine today's low is (so far) 1000 and today's high is (so far) 1050. At this moment the price is 1020. So we're 1020-1000= 20 pips above the low, there is therefore 100-20=80 pips "left" up. For a risk-to-reward ratio of (say) 3, if a long trade was to be entered now, the stop loss should be no more than 80/3=26pips away, that is at 1020-26=994. So, if all conditions are met, we ll look for a "bottom" no lower than 994. Same thing for a short trade: we are 1050-1020= 30 pips below the high, there is therefore 100-30=70 pips "left" down. For a risk-to-reward ratio of 3, if a short trade was to be entered now, the stop loss should be no more than 70/3=23pips away, that is at 1020+23=1043. So, if all conditions are met, we ll look for a "top" no higher than 1043. As you can see, this indicator doesn't tell us whether or not we have a set up to trade. What it does is, considering some past day ranges, and for a given Risk to Reward ratio, it tells us how far away we can put a stop loss. Hope this helps, Ogeima. P.S.: I used H-L (High-Low) to compute the Ranges. They are thus a bit different from mataf.net data, which computes what is known as the "True" Ranges (= Max(High for the period less the Low for the period,High for the period less the Close for the previous period,Close for the previous period and the Low for the current period)). -------- PS1: occasionnally, as someone apparently pointed out in the chatroom, RoomUp/RoomDown (and the indicative stop losses) will have negative values. For example, let's imagine that the Average Day Range is 100, today's High is 1150, today's low is 1000 and the current price is 1040. Price has traveled 1150-1040 = 110 pips down from the High, that's 10 pips more than the 100 pips of the Average Day Range, so the RoomDown will be -10 pips (and the stoploss will be -10/Risk_to_Reward_ratio). (And price has traveled 1040-1000= 40 pips from the Low so the RoomUp will be positive (=100-40=60), nothing special here.) -------- v1.3: added 2 horizontal lines at the level of the StopLosses: Green line for Long SL, Red line for Short SL. */
//+------------------------------------------------------------------+
//|                          (T_S_R)-Daily Range Calculator v1.3.mq4 |
//|                                         Copyright © 2006, Ogeima |
//|                                             Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. 
//|Made for the TSR (Trend Slope Retracement) system by FXiGoR       |
//|http://strategybuilderfx.com/showthread.php?t=17252               |
//+------------------------------------------------------------------+
// For basic explanations, see the notes at the end this script.
// For information regarding the T_S_R method, read the "FXiGoR-(T_S_R) very effective Trend Slope Retracement system" thread opened by iGoR at StrategyBuilderfx, Forex-tsd, MoneyTec, ForexFactory or Trade2Win.
#property copyright "Copyright © 2006, Ogeima"
#property link      "Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo."

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Green
#property indicator_color2 Red

//---- input parameters
extern double  Risk_to_Reward_ratio =  3.0;

double aSL_Long[];
double aSL_Short[];
int nDigits;

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
{
   IndicatorBuffers(2);
   SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,3);
   SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,3);
   
   SetIndexBuffer(0,aSL_Long);
   SetIndexBuffer(1,aSL_Short);
   
   SetIndexEmptyValue(0,EMPTY_VALUE);
   SetIndexEmptyValue(1,EMPTY_VALUE);

   if(Symbol()=="GBPJPY" || Symbol()=="EURJPY" || Symbol()=="USDJPY" || Symbol()=="CHFJPY" || Symbol()=="GOLD" || Symbol()=="_SP500")  nDigits = 2;
   else nDigits = 4;
   return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
{
   Comment("");
   return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
{
   int      R1=0,R5=0,R10=0,R20=0,RAvg=0;
   int      RoomUp=0,RoomDown=0,StopLoss_Long=0,StopLoss_Short=0;
   double   SL_Long=0,SL_Short=0;
   double   low0=0,high0=0;
   string   Text="";
   int      i=0;

   R1 =  (iHigh(NULL,PERIOD_D1,1)-iLow(NULL,PERIOD_D1,1))/Point;
   for(i=1;i<=5;i++)    R5    =  R5  +  (iHigh(NULL,PERIOD_D1,i)-iLow(NULL,PERIOD_D1,i))/Point;
   for(i=1;i<=10;i++)   R10   =  R10 +  (iHigh(NULL,PERIOD_D1,i)-iLow(NULL,PERIOD_D1,i))/Point;
   for(i=1;i<=20;i++)   R20   =  R20 +  (iHigh(NULL,PERIOD_D1,i)-iLow(NULL,PERIOD_D1,i))/Point;

   R5    = R5/5;
   R10   = R10/10;
   R20   = R20/20;
   RAvg  =  (R5+R10+R20)/3;    

   low0  =  iLow(NULL,PERIOD_D1,0);
   high0 =  iHigh(NULL,PERIOD_D1,0);

   RoomUp         =  RAvg - (Bid - low0)/Point;
   RoomDown       =  RAvg - (high0 - Bid)/Point;
   StopLoss_Long  =  RoomUp/Risk_to_Reward_ratio;
   SL_Long        =  Bid - StopLoss_Long*Point;
   StopLoss_Short =  RoomDown/Risk_to_Reward_ratio;
   SL_Short       =  Bid + StopLoss_Short*Point;

   Text =   "Average Day  Range: " +  RAvg + "\n"  + 
            "Prev 01  Day  Range: " +  R1   + "\n" + 
            "Prev 05  Days Range: " +  R5   + "\n" + 
            "Prev 10  Days Range: " +  R10  + "\n" +
            "Prev 20  Days Range: " +  R20  + "\n";
   Text =   Text +
            "Room Up:     " + RoomUp              + "\n" +
            "Room Down: " + RoomDown            + "\n" +
            "Max. StopLosses should be :"  + "\n" +
            "Long:  " + StopLoss_Long  + " Pips at " + DoubleToStr(SL_Long,nDigits)  + "\n" +
            "Short: " + StopLoss_Short + " Pips at " + DoubleToStr(SL_Short,nDigits) + "\n";

   Comment(Text);

   //-- SL Lines
   int limit;
   int counted_bars=IndicatorCounted();
   if(counted_bars<0) counted_bars=0;
   if(counted_bars>0) counted_bars--;
   limit =  counted_bars;

   for(i = 0 ;i <= limit ;i++)
   {
      if(i==0 || i==1 || i==2)
      {
         aSL_Long[i] =  SL_Long;
         aSL_Short[i]=  SL_Short;
      }
      else
      {
         aSL_Long[i] = EMPTY_VALUE;
         aSL_Short[i]= EMPTY_VALUE;
      }
   }
   return(0);
}
//+------------------------------------------------------------------+
/*
Here's a little "indicator" that does some basic calculations for us.

Let's look at what it does:
It computes yesterday's range, the previous 5, 10 and 20 days ranges. And it calculates the "Average Day Range" of these four ranges (yesterday's+ Prev 5 Day Range + Prev 10 Day Range + Prev 20 Day Range)/4.
So, if yesterday's Day Range was 80, the Previous 5 Day Range was 110, the Previous 10 Day Range was 90 and the Previous 20 Day Range was 120, then the Average Day Range would be 100.

Then there's "Room Up" and "Room Down".
Let's imagine today's low is (so far) 1000 and today's high is (so far) 1050. At this moment the price is 1020.
So we're 1020-1000= 20 pips above the low, there is therefore 100-20=80 pips "left" up. For a risk-to-reward ratio of (say) 3, if a long trade was to be entered now, the stop loss should be no more than 80/3=26pips away, that is at 1020-26=994. So, if all conditions are met, we ll look for a "bottom" no lower than 994.
Same thing for a short trade: we are 1050-1020= 30 pips below the high, there is therefore 100-30=70 pips "left" down. For a risk-to-reward ratio of 3, if a short trade was to be entered now, the stop loss should be no more than 70/3=23pips away, that is at 1020+23=1043. So, if all conditions are met, we ll look for a "top" no higher than 1043.

As you can see, this indicator doesn't tell us whether or not we have a set up to trade. What it does is, considering some past day ranges, and for a given Risk to Reward ratio, it tells us how far away we can put a stop loss.

Hope this helps,

Ogeima.

P.S.: I used H-L (High-Low) to compute the Ranges. They are thus a bit different from mataf.net data, which computes what is known as the "True" Ranges (= Max(High for the period less the Low for the period,High for the period less the Close for the previous period,Close for the previous period and the Low for the current period)).

--------
PS1: occasionnally, as someone apparently pointed out in the chatroom, RoomUp/RoomDown (and the indicative stop losses) will have negative values. For example, let's imagine that the Average Day Range is 100, today's High is 1150, today's low is 1000 and the current price is 1040.
Price has traveled 1150-1040 = 110 pips down from the High, that's 10 pips more than the 100 pips of the Average Day Range, so the RoomDown will be -10 pips (and the stoploss will be -10/Risk_to_Reward_ratio).

(And price has traveled 1040-1000= 40 pips from the Low so the RoomUp will be positive (=100-40=60), nothing special here.)
--------

v1.3: added 2 horizontal lines at the level of the StopLosses: Green line for Long SL, Red line for Short SL.
*/

Indicatore Metatrader - Demark Lines

Indicatore MetaTrader //------------------------------------------------------------------/ // Indicator-advisor based on Demark threory with additi ...

Indicatore MetaTrader 

//------------------------------------------------------------------/ // Indicator-advisor based on Demark threory with additions // Some part of the code was taken from Ind-TD-DeMark-3-1.mq4 [Kara ©] //------------------------------------------------------------------/ #property copyright "GreenDog" #property link "Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo." // v2.3 #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Red #property indicator_color2 Blue extern int showBars=3000; // if showBars= 0 so the indicator will be shown for all the chart extern int LevDP=2; // Demar Pint Levels; 2 = central bar will be higher (lower) then 2 bars on the left side and 2 bars on the right one. extern int qSteps=1; // number of steps/ no more than 3 extern int BackStep=0; // number of staps back extern int startBar=0; // ifstartBar=0 so we have recommendation for the current bar, if 1 - for possible next bar extern bool TrendLine=false; // false = no trend lines extern bool HorizontLine=false; // true = break levels extern bool ChannelLine=false; // true = channels which is parallel with trend lines extern bool TakeLines=false; // true = take profit lines extern bool Comments=false; // true = comments extern int Trend=0; // 1 = for UpTrendLines only, -1 = for DownTrendLines only, 0 = for all TrendLines extern bool ShowArrows=true; extern bool CustomFeatures=true; extern color UpTrendColor=Green; extern color DownTrendColor=Red; extern int TrendlineWidth=3; extern bool ShowAlerts=false; extern bool EmailAlert=false; int trendwidth; color trendcol; //int ColNum[]; double Buf1[]; double Buf2[]; int DotPip=10; //---- buffers double BuyBuffer[]; double SellBuffer[]; string Col[]={"Red","DarkBlue","Coral","DodgerBlue","SaddleBrown","MediumSeaGreen"}; //int ColNum[1]=coll1; //={coll1,coll2,coll3,coll4,coll5,coll6}; int ColNum[]={Red,DeepSkyBlue,Coral,Aqua,SaddleBrown,MediumSeaGreen}; //DeepSkyBlue int qPoint=0; // ïåðåìåííàÿ äëÿ íîðìàëèçàöèè öåíû int qBars; double qTime=0; // ïåðåìåííûå äëÿ ëèêâèäàöèè ãëþêîâ ïðè çàãðóçêå int init() { IndicatorBuffers(4); qBars=Bars; qSteps=MathMin(3,qSteps); while (NormalizeDouble(Point,qPoint)==0)qPoint++; int code=161; string Rem="DLines © GameOver"; IndicatorShortName(Rem); if (ShowArrows){ SetIndexStyle(0,DRAW_ARROW); SetIndexStyle(1,DRAW_ARROW); } SetIndexArrow(0,code); SetIndexArrow(1,code); SetIndexBuffer(0,Buf1); SetIndexBuffer(1,Buf2); SetIndexEmptyValue(0,0.0); SetIndexEmptyValue(1,0.0); SetIndexLabel(0,Rem); SetIndexLabel(1,Rem); SetIndexStyle(2,DRAW_ARROW,EMPTY,2); SetIndexArrow(2,241); SetIndexBuffer(2, BuyBuffer); SetIndexStyle(3,DRAW_ARROW,EMPTY,2); SetIndexArrow(3,242); SetIndexBuffer(3, SellBuffer); return(0); } int deinit() { ObjectsDeleteAll(); Comment(""); ArrayInitialize(Buf1,0.0); ArrayInitialize(Buf2,0.0); for(int i=1;i<=LevDP;i++){ ObjectDelete("HA_"+i);ObjectDelete("LA_"+i); ObjectDelete("HL_"+i);ObjectDelete("LL_"+i); ObjectDelete("HHL_"+i);ObjectDelete("HLL_"+i); ObjectDelete("HCL_"+i);ObjectDelete("LCL_"+i); for(int j=0;j<4;j++) {ObjectDelete("HTL_"+i+j);ObjectDelete("LTL_"+i+j);} } } int start(){ if (qBars!=Bars){ deinit(); Sleep(1000); qBars=Bars; qTime=0; return(0);} if (qTime==Time[0]) return(0); qTime=Time[0]; // çàïóñêàåöà òîêà íà 1ì òèêå // çàïîëíèëè è îòîáðàçèëè òî÷êè äåìàðêà if (showBars==0) showBars=Bars-LevDP; for (int cnt=showBars;cnt>LevDP;cnt--) { Buf1[cnt]=DemHigh(cnt,LevDP); Buf2[cnt]=DemLow(cnt,LevDP); } string Comm; double j; int m,s,k; m=Time[0]+Period()*60-CurTime(); j=m/60.0; s=m%60; m=(m-m%60)/60; Comm=Comm+"Demark with alerts"; Comm=Comm+( m + " minutes " + s + " seconds left to bar end")+"\n"; if (Comments){Comment(Comm);}else{Comment("Demark with alerts" + "\n" + m + " minutes " + s + " seconds left to bar end" +"\n");} Comm=Comm+"Trend Line["+On(TrendLine)+"]; Channel ["+On(ChannelLine)+ "]; Breakout level ["+On(HorizontLine)+"]; Targets ["+On(TakeLines)+"]\n"; for(cnt=1;cnt<=qSteps;cnt++) Comm=Comm+(TDMain(cnt)); Comm=Comm+"———— © GameOver ————"; if (Comments==true) Comment(Comm); return(0); } string TDMain(int Step){ int H1,H2,L1,L2,qExt,i,col; double tmp,qTL,qLevel,HT[4],LT[4]; bool isHitch; string Comm="»—»—» Step "+Step+" of "+qSteps+" (BackStep "+BackStep+")\n",Text,Rem,qp; static datetime timealertupper, timealertlower; // äëÿ DownTrendLines if (Trend<=0){ Comm=Comm+"» "+Col[Step*2-2]+" DownTrendLine "; col=ColNum[Step*2-2]; H1=GetTD(Step+BackStep,Buf1); H2=GetNextHighTD(H1); qTL=(High[H2]-High[H1])/(H2-H1); qExt=Lowest(NULL,0,MODE_LOW,H2-H1-1,H1+1); // ëîêàëüíûé ìèíèìóì ìåæäó òî÷êàìè qLevel=High[H2]-qTL*(H2); if (Step+BackStep==1) qLevel=qLevel-qTL*startBar; if (H1<0 || H2<0) Comm=Comm+"not enough points on the chart for construction\n"; else { Comm=Comm+"["+DoubleToStr(High[H2],qPoint)+"»"+DoubleToStr(High[H1],qPoint)+"]"; Comm=Comm+"; Level "+DoubleToStr(qLevel,qPoint); if (Step+BackStep==1) { if (startBar>0) Comm=Comm+"; Future Bar "+UpHitch(-1,qLevel); else Comm=Comm+"; Last Bar "+UpHitch(startBar,qLevel); } Comm=Comm+"\n"; // Àíàëèç - áûë ëè ïðîáîé òðåíäîâîé ëèíèè i=H1;isHitch=false;Text=""; while(i>0 && isHitch==false){ BuyBuffer[i]=0; tmp=High[H2]-qTL*(H2-i); Rem="HA_"+Step; if (Close[i]>tmp){ qp=UpHitch(i,tmp); if (qp!=""){ isHitch=true; Text=Text+"Source "+DoubleToStr(tmp,qPoint)+" "+qp; BuyBuffer[i]=Low[i]-DotPip*Point; if (timealertupper!=Time[i]){ if (ShowAlerts){ Alert ("MOUTEKI: Upper trendline broken on " + Symbol() + " TF: " + Period() + " @ " + Bid); } ObjectCreate(Rem,OBJ_ARROW,0,0,0,0,0); ObjectSet(Rem,OBJPROP_COLOR,col); ObjectSet(Rem,OBJPROP_PRICE1,Low[i]-Point); ObjectSet(Rem,OBJPROP_TIME1,Time[i]); ObjectSet(Rem,OBJPROP_ARROWCODE,241); //} if (EmailAlert){ SendMail("MOUTEKI: Upper trendline broken on " + Symbol() + " TF: " + Period() + " @ " + Bid, "MOUTEKI: Upper trendline broken on " + Symbol() + " TF: " + Period() + " @ " + Bid + "\n" + "Alerts by LightKeeper. Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo."); } timealertupper=Time[i]; } ///////////////////////////////////// ObjectCreate(Rem,OBJ_ARROW,0,0,0,0,0); ObjectSet(Rem,OBJPROP_COLOR,col); ObjectSet(Rem,OBJPROP_PRICE1,Low[i]-Point); ObjectSet(Rem,OBJPROP_TIME1,Time[i]); ObjectSet(Rem,OBJPROP_ARROWCODE,241); //////////////////////////////////// if (ShowArrows==true){ while(i>0){ // ïðîáîé îòìåíåí, åñëè ïîñëå ïðîáîÿ áûë íîâûé ëîó èëè çàêðûòèå íèæå i--; if (Low[i]<Low[qExt] || Close[i]<(Low[qExt]+(High[H1]-Low[qExt])*0.236)){ Text=Text+" (cancel)"; ObjectSet(Rem,OBJPROP_PRICE1,Low[i]-Point); ObjectSet(Rem,OBJPROP_TIME1,Time[i]); ObjectSet(Rem,OBJPROP_ARROWCODE,251); break; } } } } else { Text=Text+"False "+DoubleToStr(tmp,qPoint)+"; "; ObjectDelete(Rem);} } i--; } if (Text=="") Text="No breakout"; Comm=Comm+Text+"\n"; // end analysis Rem="HL_"+Step; // ñîáñíî ëèíèÿ òðåíäà if (CustomFeatures){trendcol=DownTrendColor;}else{trendcol=col;} if (TrendLine){ if (CustomFeatures==false){trendwidth=3-MathMin(2,Step);}else{trendwidth=TrendlineWidth;} ObjectCreate(Rem,OBJ_TREND,0,0,0,0,0); ObjectSet(Rem,OBJPROP_TIME1,Time[H2]);ObjectSet(Rem,OBJPROP_TIME2,Time[H1]); ObjectSet(Rem,OBJPROP_PRICE1,High[H2]);ObjectSet(Rem,OBJPROP_PRICE2,High[H1]); ObjectSet(Rem,OBJPROP_COLOR,trendcol); ObjectSet(Rem,OBJPROP_WIDTH,trendwidth); } else ObjectDelete(Rem); Rem="HHL_"+Step; // óðîâåíü ïðîáîÿ ëèíèè òðåíäà if (HorizontLine && (Step+BackStep)==1){ ObjectCreate(Rem,OBJ_HLINE,0,0,0,0,0); ObjectSet(Rem,OBJPROP_PRICE1,qLevel); ObjectSet(Rem,OBJPROP_COLOR,trendcol); } else ObjectDelete(Rem); Rem="HCL_"+Step; // ëèíèÿ êàíàëà if (ChannelLine){ ObjectCreate(Rem,OBJ_TREND,0,0,0,0,0); ObjectSet(Rem,OBJPROP_TIME1,Time[qExt]);ObjectSet(Rem,OBJPROP_TIME2,Time[0]); ObjectSet(Rem,OBJPROP_PRICE1,Low[qExt]);ObjectSet(Rem,OBJPROP_PRICE2,Low[qExt]-qTL*qExt); ObjectSet(Rem,OBJPROP_COLOR,trendcol); } else ObjectDelete(Rem); Rem="HTL_"+Step; // ëèíèè öåëåé if (TakeLines){ HT[3]=Low[qExt]+(High[H1]-Low[qExt])*1.618-qLevel; // äîï óðîâåíü HT[0]=High[H2]-qTL*(H2-qExt)-Low[qExt]; HT[1]=High[H2]-qTL*(H2-qExt)-Close[qExt]; qExt=Lowest(NULL,0,MODE_CLOSE,H2-H1,H1); HT[2]=High[H2]-qTL*(H2-qExt)-Close[qExt]; Comm=Comm+"Targets: "; for(i=0;i<4;i++){ qTL=NormalizeDouble(qLevel+HT[i],qPoint); ObjectCreate(Rem+i,OBJ_HLINE,0,0,0,0,0); ObjectSet(Rem+i,OBJPROP_PRICE1,qTL); ObjectSet(Rem+i,OBJPROP_STYLE,STYLE_DOT); ObjectSet(Rem+i,OBJPROP_COLOR,trendcol); Comm=Comm+DoubleToStr(qTL,qPoint)+" ("+DoubleToStr(HT[i]/Point,0)+"p.) "; } Comm=Comm+"\n"; } else { for(i=0;i<4;i++) ObjectDelete(Rem+i); } } } // äëÿ UpTrendLines if (Trend>=0){ Comm=Comm+"» "+Col[Step*2-1]+" UpTrendLine "; col=ColNum[Step*2-1]; L1=GetTD(Step+BackStep,Buf2); L2=GetNextLowTD(L1); qTL=(Low[L1]-Low[L2])/(L2-L1); qExt=Highest(NULL,0,MODE_HIGH,L2-L1-1,L1+1); // ëîêàëüíûé ìèíèìóì ìåæäó òî÷êàìè qLevel=Low[L2]+qTL*L2; if (Step+BackStep==1) qLevel=qLevel+qTL*startBar; if (L1<0 || L2<0) Comm=Comm+"not enough points on the chart for construction\n"; else { Comm=Comm+"["+DoubleToStr(Low[L2],qPoint)+"»"+DoubleToStr(Low[L1],qPoint)+"]"; Comm=Comm+"; Level "+DoubleToStr(qLevel,qPoint); if (Step+BackStep==1) { if (startBar>0) Comm=Comm+"; Future Bar "+DownHitch(-1,qLevel); else Comm=Comm+"; Last Bar "+DownHitch(startBar,qLevel); } Comm=Comm+"\n"; // Àíàëèç - áûë ëè ïðîáîé òðåíäîâîé ëèíèè i=L1;isHitch=false;Text=""; while(i>0 && isHitch==false){ SellBuffer[i]=0; tmp=Low[L2]+qTL*(L2-i); Rem="LA_"+Step; if (Close[i]<tmp){ qp=DownHitch(i,tmp); if (qp!=""){ isHitch=true; Text=Text+"Source "+DoubleToStr(tmp,qPoint)+" "+qp; SellBuffer[i]=High[i]+DotPip*Point; if (timealertlower!=Time[i]){ if(ShowAlerts){ Alert ("MOUTEKI: Lower trendline broken on " + Symbol() + " TF: " + Period() + " @ " + Bid); } ObjectCreate(Rem,OBJ_ARROW,0,0,0,0,0); ObjectSet(Rem,OBJPROP_COLOR,col); ObjectSet(Rem,OBJPROP_PRICE1,Low[i]-Point); ObjectSet(Rem,OBJPROP_TIME1,Time[i]); ObjectSet(Rem,OBJPROP_ARROWCODE,242); //} if (EmailAlert){ SendMail("MOUTEKI: Lower trendline broken on " + Symbol() + " TF: " + Period() + " @ " + Bid, "MOUTEKI: Lower trendline broken on " + Symbol() + " TF: " + Period() + " @ " + Bid + "\n" + "Alerts by LightKeeper. Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo."); } timealertlower=Time[i]; } /////////////////////////////// ObjectCreate(Rem,OBJ_ARROW,0,0,0,0,0); ObjectSet(Rem,OBJPROP_COLOR,col); ObjectSet(Rem,OBJPROP_PRICE1,Low[i]-Point); ObjectSet(Rem,OBJPROP_TIME1,Time[i]); ObjectSet(Rem,OBJPROP_ARROWCODE,242); ////////////////////////////// if (ShowArrows==true){ while(i>0){ // ïðîáîé îòìåíåí, åñëè ïîñëå ïðîáîÿ áûë íîâûé õàé èëè çàêðûòèå âûøå i--; if (High[i]>High[qExt] || Close[i]>High[qExt]-(High[qExt]-Low[L1])*0.236){ Text=Text+" (cancel)"; ObjectSet(Rem,OBJPROP_PRICE1,Low[i]-Point); ObjectSet(Rem,OBJPROP_TIME1,Time[i]); ObjectSet(Rem,OBJPROP_ARROWCODE,251); break; } } } } else { Text=Text+"False "+DoubleToStr(tmp,qPoint)+"; "; ObjectDelete(Rem);} } i--; } if (Text=="") Text="No breakout"; Comm=Comm+Text+"\n"; // end analysis Rem="LL_"+Step; // ñîáñíî ëèíèÿ òðåíäà if (CustomFeatures){trendcol=UpTrendColor;}else{trendcol=col;} if (TrendLine==1) { if (CustomFeatures==false){trendwidth=3-MathMin(2,Step);}else{trendwidth=TrendlineWidth;} ObjectCreate(Rem,OBJ_TREND,0,0,0,0,0); ObjectSet(Rem,OBJPROP_TIME1,Time[L2]);ObjectSet(Rem,OBJPROP_TIME2,Time[L1]); ObjectSet(Rem,OBJPROP_PRICE1,Low[L2]);ObjectSet(Rem,OBJPROP_PRICE2,Low[L1]); ObjectSet(Rem,OBJPROP_COLOR,trendcol); ObjectSet(Rem,OBJPROP_WIDTH,trendwidth); } else ObjectDelete(Rem); Rem="HLL_"+Step; // óðîâåíü ïðîáîÿ ëèíèè òðåíäà if (HorizontLine && (Step+BackStep)==1){ ObjectCreate(Rem,OBJ_HLINE,0,0,0,0,0); ObjectSet(Rem,OBJPROP_PRICE1,qLevel); ObjectSet(Rem,OBJPROP_COLOR,trendcol); } else ObjectDelete(Rem); Rem="LCL_"+Step; // ëèíèÿ êàíàëà if (ChannelLine){ ObjectCreate(Rem,OBJ_TREND,0,0,0,0,0); ObjectSet(Rem,OBJPROP_TIME1,Time[qExt]);ObjectSet(Rem,OBJPROP_TIME2,Time[0]); ObjectSet(Rem,OBJPROP_PRICE1,High[qExt]);ObjectSet(Rem,OBJPROP_PRICE2,High[qExt]+qTL*qExt); ObjectSet(Rem,OBJPROP_COLOR,trendcol); } else ObjectDelete(Rem); Rem="LTL_"+Step; if (TakeLines){ // ëèíèè öåëåé LT[3]=qLevel-High[qExt]+(High[qExt]-Low[L1])*1.618; // äîï óðîâåíü LT[0]=High[qExt]-qTL*(L2-qExt)-Low[L2]; LT[1]=Close[qExt]-qTL*(L2-qExt)-Low[L2]; qExt=Highest(NULL,0,MODE_CLOSE,L2-L1,L1); LT[2]=Close[qExt]-qTL*(L2-qExt)-Low[L2]; Comm=Comm+"Targets: "; for(i=0;i<4;i++){ qTL=NormalizeDouble(qLevel-LT[i],qPoint); ObjectCreate(Rem+i,OBJ_HLINE,0,0,0,0,0); ObjectSet(Rem+i,OBJPROP_PRICE1,qTL); ObjectSet(Rem+i,OBJPROP_STYLE,STYLE_DOT); ObjectSet(Rem+i,OBJPROP_COLOR,trendcol); Comm=Comm+DoubleToStr(qTL,qPoint)+" ("+DoubleToStr(LT[i]/Point,0)+"p.) "; } Comm=Comm+"\n"; } else { for(i=0;i<4;i++) ObjectDelete(Rem+i); } } } return(Comm); } int GetTD(int P, double Arr[]){ int i=0,j=0; while(j<P){ i++; while(Arr[i]==0){i++;if(i>showBars-2)return(-1);} j++;} return (i); } int GetNextHighTD(int P){ int i=P+1; while(Buf1[i]<=High[P]){i++;if(i>showBars-2)return(-1);} return (i); } int GetNextLowTD(int P){ int i=P+1; while(Buf2[i]>=Low[P] || Buf2[i]==0){i++;if(i>showBars-2)return(-1);} return (i); } // ðåêóðñèâíàÿ ïðîâåðêà íà óñëîâèÿ Äåìàðêà (õàé), âîçâðàùàåò çíà÷åíèå èëè 0 double DemHigh(int cnt, int sh){ if (High[cnt]>=High[cnt+sh] && High[cnt]>High[cnt-sh]) { if (sh>1) return(DemHigh(cnt,sh-1)); else return(High[cnt]); } else return(0); } // ðåêóðñèâíàÿ ïðîâåðêà íà óñëîâèÿ Äåìàðêà (ëîó), âîçâðàùàåò çíà÷åíèå èëè 0 double DemLow(int cnt, int sh){ if (Low[cnt]<=Low[cnt+sh] && Low[cnt]<Low[cnt-sh]) { if (sh>1) return(DemLow(cnt,sh-1)); else return(Low[cnt]); } else return(0); } string On(bool On){ if (On) return("on"); else return("off"); } string UpHitch(int P, double qLevel){ // îïðåäåëåíèå êâàëèôèêàòîðîâ ïðîðûâà ââåðõ string Comm=""; if (Close[P+1]<Close[P+2]) Comm=Comm+" 1"; if (P>=0 && Open[P]>qLevel) Comm=Comm+" 2"; if (2*Close[P+1]-Low[P+1]<qLevel) Comm=Comm+" 3"; if (Comm!="") Comm="[ Break Qualificator:"+Comm+" ]"; return(Comm); } string DownHitch(int P, double qLevel){ // îïðåäåëåíèå êâàëèôèêàòîðîâ ïðîðûâà âíèç string Comm=""; if (Close[P+1]>Close[P+2]) Comm=Comm+" 1"; if (P>=0 && Open[P]<qLevel) Comm=Comm+" 2"; if (2*Close[P+1]-High[P+1]>qLevel) Comm=Comm+" 3"; if (Comm!="") Comm="[ Break Qualificator:"+Comm+" ]"; return(Comm); }
http://www.expert-advisor.it/metatrader-indicators-free

Indicatore Metatrader - Execute Line

Indicatore MetaTrader //+------------------------------------------------------------------+ //| HMA.mq4 //| Copyright © 2006 WizardSerg <Que ...

Indicatore MetaTrader 

//+------------------------------------------------------------------+ //| HMA.mq4 //| Copyright © 2006 WizardSerg <Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo.>, ?? ??????? ForexMagazine #104 //| Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. //| Revised by IgorAD,Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. | //| //| Personalized by iGoR AKA FXiGoR for the Trend Slope Trading method (T_S_T) //| Link: //| contact: Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. //+------------------------------------------------------------------+ #property copyright "MT4 release WizardSerg <Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo.>, ?? ??????? ForexMagazine #104" #property link "Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo." #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Yellow #property indicator_color2 Magenta //---- input parameters extern int period=5; extern int method=3; // MODE_SMA extern int price=0; // PRICE_CLOSE //---- buffers double Uptrend[]; double Dntrend[]; double ExtMapBuffer[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { IndicatorBuffers(3); SetIndexBuffer(0, Uptrend); //ArraySetAsSeries(Uptrend, true); SetIndexBuffer(1, Dntrend); //ArraySetAsSeries(Dntrend, true); SetIndexBuffer(2, ExtMapBuffer); ArraySetAsSeries(ExtMapBuffer, true); SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2); SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,2); IndicatorShortName("Execute Line("+period+")"); return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { // ???? ????? ?????? ?????? return(0); } //+------------------------------------------------------------------+ //| ?????????? ??????? | //+------------------------------------------------------------------+ double WMA(int x, int p) { return(iMA(NULL, 0, p, 0, method, price, x)); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars = IndicatorCounted(); if(counted_bars < 0) return(-1); int x = 0; int p = MathSqrt(period); int e = Bars - counted_bars + period + 1; double vect[], trend[]; if(e > Bars) e = Bars; ArrayResize(vect, e); ArraySetAsSeries(vect, true); ArrayResize(trend, e); ArraySetAsSeries(trend, true); for(x = 0; x < e; x++) { vect[x] = 2*WMA(x, period/2) - WMA(x, period); // Print("Bar date/time: ", TimeToStr(Time[x]), " close: ", Close[x], " vect[", x, "] = ", vect[x], " 2*WMA(p/2) = ", 2*WMA(x, period/2), " WMA(p) = ", WMA(x, period)); } for(x = 0; x < e-period; x++) ExtMapBuffer[x] = iMAOnArray(vect, 0, p, 0, method, x); for(x = e-period; x >= 0; x--) { trend[x] = trend[x+1]; if (ExtMapBuffer[x]> ExtMapBuffer[x+1]) trend[x] =1; if (ExtMapBuffer[x]< ExtMapBuffer[x+1]) trend[x] =-1; if (trend[x]>0) { Uptrend[x] = ExtMapBuffer[x]; if (trend[x+1]<0) Uptrend[x+1]=ExtMapBuffer[x+1]; Dntrend[x] = EMPTY_VALUE; } else if (trend[x]<0) { Dntrend[x] = ExtMapBuffer[x]; if (trend[x+1]>0) Dntrend[x+1]=ExtMapBuffer[x+1]; Uptrend[x] = EMPTY_VALUE; } //Print( " trend=",trend[x]); } return(0); } //+------------------------------------------------------------------+

Indicatore Metatrader - Signal Line

Indicatore MetaTrader //+------------------------------------------------------------------+ //| HMA.mq4 //| Copyright © 2006 WizardSerg <Que ...

Indicatore MetaTrader 

//+------------------------------------------------------------------+ //| HMA.mq4 //| Copyright © 2006 WizardSerg <Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo.>, ?? ??????? ForexMagazine #104 //| Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. //| Revised by IgorAD,Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. | //| Personalized by iGoR AKA FXiGoR for the Trend Slope Trading method (T_S_T) //| Link: //| contact: Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. //+------------------------------------------------------------------+ #property copyright "MT4 release WizardSerg <Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo.>, ?? ??????? ForexMagazine #104" #property link "Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo." #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Lime #property indicator_color2 Red //---- input parameters extern int period=15; extern int method=3; // MODE_SMA extern int price=0; // PRICE_CLOSE //---- buffers double Uptrend[]; double Dntrend[]; double ExtMapBuffer[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { IndicatorBuffers(3); SetIndexBuffer(0, Uptrend); //ArraySetAsSeries(Uptrend, true); SetIndexBuffer(1, Dntrend); //ArraySetAsSeries(Dntrend, true); SetIndexBuffer(2, ExtMapBuffer); ArraySetAsSeries(ExtMapBuffer, true); SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2); SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,2); IndicatorShortName("Signal Line("+period+")"); return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { // ???? ????? ?????? ?????? return(0); } //+------------------------------------------------------------------+ //| ?????????? ??????? | //+------------------------------------------------------------------+ double WMA(int x, int p) { return(iMA(NULL, 0, p, 0, method, price, x)); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars = IndicatorCounted(); if(counted_bars < 0) return(-1); int x = 0; int p = MathSqrt(period); int e = Bars - counted_bars + period + 1; double vect[], trend[]; if(e > Bars) e = Bars; ArrayResize(vect, e); ArraySetAsSeries(vect, true); ArrayResize(trend, e); ArraySetAsSeries(trend, true); for(x = 0; x < e; x++) { vect[x] = 2*WMA(x, period/2) - WMA(x, period); // Print("Bar date/time: ", TimeToStr(Time[x]), " close: ", Close[x], " vect[", x, "] = ", vect[x], " 2*WMA(p/2) = ", 2*WMA(x, period/2), " WMA(p) = ", WMA(x, period)); } for(x = 0; x < e-period; x++) ExtMapBuffer[x] = iMAOnArray(vect, 0, p, 0, method, x); for(x = e-period; x >= 0; x--) { trend[x] = trend[x+1]; if (ExtMapBuffer[x]> ExtMapBuffer[x+1]) trend[x] =1; if (ExtMapBuffer[x]< ExtMapBuffer[x+1]) trend[x] =-1; if (trend[x]>0) { Uptrend[x] = ExtMapBuffer[x]; if (trend[x+1]<0) Uptrend[x+1]=ExtMapBuffer[x+1]; Dntrend[x] = EMPTY_VALUE; } else if (trend[x]<0) { Dntrend[x] = ExtMapBuffer[x]; if (trend[x+1]>0) Dntrend[x+1]=ExtMapBuffer[x+1]; Uptrend[x] = EMPTY_VALUE; } //Print( " trend=",trend[x]); } return(0); } //+------------------------------------------------------------------+

Indicatore Metatrader - Slope Direction Line

Indicatore MetaTrader //+------------------------------------------------------------------+ //| HMA.mq4 //| Copyright © 2006 WizardSerg <Que ...

Indicatore MetaTrader 

//+------------------------------------------------------------------+ //| HMA.mq4 //| Copyright © 2006 WizardSerg <Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo.>, ?? ??????? ForexMagazine #104 //| Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. //| Revised by IgorAD,Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. | //| Personalized by iGoR AKA FXiGoR for the Trend Slope Trading method (T_S_T) //| Link: //| contact: Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo. //+------------------------------------------------------------------+ #property copyright "MT4 release WizardSerg <Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo.>, ?? ??????? ForexMagazine #104" #property link "Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo." #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 LightBlue #property indicator_color2 Tomato //---- input parameters extern int period=80; extern int method=3; // MODE_SMA extern int price=0; // PRICE_CLOSE //---- buffers double Uptrend[]; double Dntrend[]; double ExtMapBuffer[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { IndicatorBuffers(3); SetIndexBuffer(0, Uptrend); //ArraySetAsSeries(Uptrend, true); SetIndexBuffer(1, Dntrend); //ArraySetAsSeries(Dntrend, true); SetIndexBuffer(2, ExtMapBuffer); ArraySetAsSeries(ExtMapBuffer, true); SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2); SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,2); IndicatorShortName("Slope Direction Line("+period+")"); return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { // ???? ????? ?????? ?????? return(0); } //+------------------------------------------------------------------+ //| ?????????? ??????? | //+------------------------------------------------------------------+ double WMA(int x, int p) { return(iMA(NULL, 0, p, 0, method, price, x)); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars = IndicatorCounted(); if(counted_bars < 0) return(-1); int x = 0; int p = MathSqrt(period); int e = Bars - counted_bars + period + 1; double vect[], trend[]; if(e > Bars) e = Bars; ArrayResize(vect, e); ArraySetAsSeries(vect, true); ArrayResize(trend, e); ArraySetAsSeries(trend, true); for(x = 0; x < e; x++) { vect[x] = 2*WMA(x, period/2) - WMA(x, period); // Print("Bar date/time: ", TimeToStr(Time[x]), " close: ", Close[x], " vect[", x, "] = ", vect[x], " 2*WMA(p/2) = ", 2*WMA(x, period/2), " WMA(p) = ", WMA(x, period)); } for(x = 0; x < e-period; x++) ExtMapBuffer[x] = iMAOnArray(vect, 0, p, 0, method, x); for(x = e-period; x >= 0; x--) { trend[x] = trend[x+1]; if (ExtMapBuffer[x]> ExtMapBuffer[x+1]) trend[x] =1; if (ExtMapBuffer[x]< ExtMapBuffer[x+1]) trend[x] =-1; if (trend[x]>0) { Uptrend[x] = ExtMapBuffer[x]; if (trend[x+1]<0) Uptrend[x+1]=ExtMapBuffer[x+1]; Dntrend[x] = EMPTY_VALUE; } else if (trend[x]<0) { Dntrend[x] = ExtMapBuffer[x]; if (trend[x+1]>0) Dntrend[x+1]=ExtMapBuffer[x+1]; Uptrend[x] = EMPTY_VALUE; } //Print( " trend=",trend[x]); } return(0); } //+------------------------------------------------------------------+

Indicatori di Analisi Tecnica

Indicatori di Analisi tecnica: descrizione dei principali indicatori utilizzati dai traders. Relative Vigor Index (RVI) Il Relative Vigor Index (RVI) ...

Indicatori di Analisi tecnica: descrizione dei principali indicatori utilizzati dai traders.


Relative Vigor Index (RVI)
Il Relative Vigor Index (RVI) è un indicatore di analisi tecnica ideato nel 2002 da John Ehlers, lo scopo di questo indicatore è riuscire, come dice il nome stesso, a misurare la forza di un movimento di mercato, la forza del trend. La formula utilizzata nel suo calcolo è molto semplice:  Relative Vigor Index (RVI) = (prezzo di chiusura – prezzo di apertura) / ( prezzo di massimo – prezzo di minimo), di default viene calcolata una media a 10 periodi, poi l’indicatore si può adattare secondo il mercato e le vostre esigenze ma questo sono i caratteri stabiliti dall’autore. Oltre questa media viene affiancata un indicatore che esprime gli ultimi 4 periodi dell’indicatore, in tal modo quando si incrociano le due linee possono generare segnali di acquisto e vendita come un normale oscillatore. La loro posizione in basso o in alto è importante anche per stabilire le fasi di ipercomprato e ipervenduto.

Ichimoku Kinko Hyo

Un indicatore non molto popolare nei salotti di trading, ma per chi ne conosce le potenzialità e le peculiarità è molto utile, questo indicatore riesce a indicare i punti di resistenza, di supporto di entrata e uscita di un movimento di mercato con un unico indicatore. A prima vista potrebbe sembrare confuso, ma se si riesce a distinguere gli elementi che lo compongono diventa semplice utilizzarlo.
Questo indicatore considera 4 intervalli di tempo ed è composto da 5 elementi.
La linea Rossa chiamata Tenkan-sen – [Prezzo medio (Massimo + Minimo) / 2] sul primo periodo temporale (9), questa linea indica il trend al rialzo, ribasso e se piatta trading range.
La linea Blu: Kijun-sen –si occupa del secondo periodo temporale 26 intervalli.
L’aria arancione: Senkou Span A / Up Kumo – è la metà delle linea rossa e blu.
L’area grigia: Senkou Span B / Down Kumo – indica il terzo perido 52 intervalli temporali, lo spazio indica i supporti e resistenze.
La linea verde: Chinkou Span – utilizza il prezzo corrente anteposta di 26 intervalli temporali

Force index

Il force index, è un indicatore di analisi tecnica, ideato da Elder. L’obiettivo di questo indicatore è calcolare la forza del cambiamento dei prezzi. Il force index usa i volumi, l’ultimo prezzo di chiusura e il precedente prezzo. Questo oscillatore cerca di essere tempestivo nell’individuare subito l’attuale movimento del mercato e i suoi possibili cambiamenti. La più grande utilità di questo indicatore è misurare la forza del movimento, la forza della tendenza in atto sul mercato. Questo indicatore è molto utilizzato per il mercato delle commodity, nel forex trova scarsa utilità poiché per quanto riguarda i volumi nel forex non sono conosciuti, dato che non è un mercato regolamentato. Alcuni trader consigliano la sua utilità nel segnalare la fine della tendenza quando è prossimo allo zero.

Envelopes

Envelopes è un indicatore, molto ultilizzato per definire il range dei prezzi, utilizzato per delineare il canale di oscillazione dei prezzi,  in modo tale da poter individuare segnali di vendita o acquisto delle coppie di valutesul mercato forex, presente in metatrader. Questo indicatore quindi funziona bene quando il mercato è in trading range, fa parte della famiglia degli oscillatori. I parametri dell’indicatore vanno aggiustati seconda la volatilità, le bande sono delle semplici medie mobili, ma devono funzionare da involucro per il range dei prezzi. In pratica, si dovrebbe vendere quando i prezzi toccano la banda superiore, e acquistare quando i prezzi toccano la banda inferiore.



Demarker

Un indicatore non molto diffuso, ma utile per indentificare dei punti o zone dove è possibile comprare o vendere, ideale per il positing trading. È un indicatore molto particolare, viene identificato come un indicatore di sintesi, dove la differenza tra i massimi è positiva o nulla, come la diferenza tra i minimi è negativa o nulla, quindi elimina in parte il rumore del mercato. Funziona come l’RSI o come un qualsiasi oscillatore in prossimità di 0.7 indica una zona di ipercomprato, quindi bisognerebbe stare allerta per vendere, un zona 0.3 è di ipervenduto quindi bisogna stare attenti per comprare. È utilizzato principalmente per il ttrading settimanale o giornaliero.

>>   Indicatori per Metatrader Gratis<<

 

Leggi anche:

Forex Expert Advisor.

Avviso. I Forex Expert Advisor ed i mercati finanziari comportano rischi. Ti invitiamo a consultare il " Disclaimer " e la " Privacy "