Download KiS Avg indicators

kisAlmost certainly this mq4 code works with all the various versions of MT out in the market, after correctly trying it with MT4 (Metatrader 4) and MT5 (Metatrader 5). Using the data collected from tests , we could make sure there will no problems with the compatibility with product

In case you really like or find this KiS Avg is a great indicator for Forex please do not forget to rate the indicator. We also request you to write few lines in our comment section about KiS Avg indicator like – ways to use it or best way to trade with it. We’ll look at through your honest rating and also reviews as a very important thing you do to our quest on taking or perhaps picking indicators as currency exchange traders.

Obviously, many Forex currency investors will always look for better indicators that will help them trade more and precisely. It is a good news to online businessmen that cost-free KiS Avg indicator can assist traders in getting the best deals for them necessary in growing their business’ earnings. Additionally, we are exerting great efforts in posting Forex indicators such as KiS Avg in our web page. On this, downloading it at no cost and create savvy choices and become much better traders in return is achievable.

 

[php]</pre>
//+——————————————————————+
//| KiS_max_min_Avg.mq4 |
//+——————————————————————+
/*[[
Name := KiS_max_min_Avg
Author := KCBT
Link := http://www.kcbt.ru/forum/index.php?
]]*/

#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 MediumOrchid
#property indicator_color2 Aqua
#property indicator_color3 MediumOrchid
//—- indicator buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];

//+——————————————————————+
//| Custom indicator initialization function |
//+——————————————————————+
int init()
{
SetIndexBuffer(0, ExtMapBuffer1);
SetIndexStyle(0, DRAW_LINE);
SetIndexBuffer(1, ExtMapBuffer2);
SetIndexStyle(1, DRAW_LINE);
SetIndexBuffer(2, ExtMapBuffer3);
SetIndexStyle(2, DRAW_LINE);
return(0);
}

//+——————————————————————+
//| Custom indicator deinitialization function |
//+——————————————————————+
int deinit()
{
Comment(“”);
return(0);
}

//+——————————————————————+
//| Custom indicator iteration function |
//+——————————————————————+
int start()
{
int shift, i, CurDay, BarCount;
double DayMax, DayMin;
double DayOpen, DayClose, Avg;

for (shift=Bars-1; shift>=0; shift–) {
if (CurDay != TimeDay(Time[shift])) {
for (i=BarCount; i>=0; i–) {
ExtMapBuffer1[shift+i] = DayMax;
ExtMapBuffer2[shift+i] = (DayMax+DayMin)/2;
ExtMapBuffer3[shift+i] = DayMin;
}
CurDay = TimeDay(Time[shift]);
BarCount = 0;
DayMax = 0;
DayMin = 1000; //اàًàيهه لîëüّه, ÷ٍîل َىهيüّèëٌے â ïًîِهٌٌه
DayOpen = Open[shift];
}
if (DayMax < High[shift]) {DayMax = High[shift];}
if (DayMin > Low[shift]) {DayMin = Low[shift];}
BarCount = BarCount + 1;
}

// ‎ٍî نîًèٌîâêà ïîٌëهنيهمî, يهçàâهًّهييîمî هùه, نيے
for (i=BarCount; i>=0; i–) {
ExtMapBuffer1[shift+i] = DayMax;
ExtMapBuffer2[shift+i] = (DayMax+DayMin)/2;
ExtMapBuffer3[shift+i] = DayMin;
}
DayClose = Close[0];
Avg = (DayMax+DayMin)/2; //ًٌهنيےے çà ٍهêَùèé نهيü

Comment(“Max:”, DayMax,” Min:”, DayMin, “\n”, “Avg:”, Avg, ” Width:”, (DayMax-DayMin)/Point,”\n”,”خٍ Avg نî Open:”,MathRound(MathAbs(Avg-DayOpen)/Point),”\n”,”خٍ Avg نî Close:”,MathRound(MathAbs(Avg-DayClose)/Point));
return(0);
}
//+——————————————————————+
<pre>[/php]

Click Here to Download

Download OsMACD M indicators

osmacdWe have tested this mq4 code and it really works properly with Metatrader 4 and MT5 (Metatrader 5) program and possibly works on all MT editions.

We’ll be glad if you can rate the indicator and throw in some of your feedbacks or ideas by publishing it within the comment section when you are already settled to make use of this OsMACD M and find this indicator as helpful for Forex. Together with your remarks, ratings and reviews, you can even help your fellow Forex currency investors to test such indicators.

Obviously, far better indicators that will help in trading a lot more the precise way are what the majority of FX investors want to have. It is a very good news to web businessmen that free OsMACD M indicator can help traders in acquiring the greatest deals for them needed in growing their business’ profits. Moreover, we see to it the Forex indicators like OsMACD M are published in our site. With that said, it’s possible for online entrepreneurs to download it without having to spend money making them to come up with wise decisions . Therefore, they’ll turn out to be exceptional traders.

 

[php]</pre>
//+——————————————————————+
//| OsMACD.mq4 |
//| Copyright © 2007, SOK |
//| http://SOK.LiteForex.net |
//+——————————————————————+
#property copyright “Copyright © 2007, SOK”
#property link “http://sok.liteforex.net”
//—-
#property indicator_separate_window
#property indicator_buffers 7
#property indicator_color1 LimeGreen
#property indicator_color2 Magenta
#property indicator_color3 Black
#property indicator_color4 Blue
#property indicator_color5 Red
#property indicator_color6 Black
#property indicator_color7 Brown
//—- input parameters
extern int FastEMA = 12;
extern int SlowEMA = 26;
extern int SignalSMA = 9;
extern int AplyingPrice = 0;
//—- buffers
double ExtMapBuffer0[];
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double ExtMapBuffer5[];
double ExtMapBuffer6[];
//+——————————————————————+
//| Custom indicator initialization function |
//+——————————————————————+
int init()
{
//—- indicators
SetIndexStyle(0, DRAW_LINE, 0, 2);
SetIndexBuffer(0, ExtMapBuffer0);
SetIndexStyle(1, DRAW_LINE, 0, 2);
SetIndexBuffer(1, ExtMapBuffer1);
SetIndexStyle(2, DRAW_NONE);
SetIndexBuffer(2, ExtMapBuffer2);
//—-
SetIndexStyle(3, DRAW_HISTOGRAM);
SetIndexBuffer(3, ExtMapBuffer3);
SetIndexStyle(4, DRAW_HISTOGRAM);
SetIndexBuffer(4, ExtMapBuffer4);
SetIndexStyle(5, DRAW_NONE);
SetIndexBuffer(5, ExtMapBuffer5);
SetIndexStyle(6, DRAW_LINE);
SetIndexBuffer(6, ExtMapBuffer6);
//—-
IndicatorShortName(“OsMACD_M(” + FastEMA + “, ” + SlowEMA + “, ” +
SignalSMA + “)”);
SetIndexLabel(0,NULL);
SetIndexLabel(1,NULL);
SetIndexLabel(2, “OsMA”);
SetIndexLabel(3,NULL);
SetIndexLabel(4,NULL);
SetIndexLabel(5, “MACD”);
SetIndexLabel(6, “Signal”);
//—-
SetIndexDrawBegin(0, MathMax(FastEMA, MathMax(SlowEMA, SignalSMA)));
SetIndexDrawBegin(1, MathMax(FastEMA, MathMax(SlowEMA, SignalSMA)));
SetIndexDrawBegin(3, MathMax(FastEMA, MathMax(SlowEMA, SignalSMA)));
SetIndexDrawBegin(4, MathMax(FastEMA, MathMax(SlowEMA, SignalSMA)));
SetIndexDrawBegin(6, MathMax(FastEMA, MathMax(SlowEMA, SignalSMA)));
//—-
return(0);
}
//+——————————————————————+
//| Custom indicator deinitialization function |
//+——————————————————————+
int deinit()
{
//—-
return(0);
}
//+——————————————————————+
//| Custom indicator iteration function |
//+——————————————————————+
int start()
{
int limit;
double dOsMAPrev, dMACDPrev;
int counted_bars = IndicatorCounted();
//—- ïîٌëهنيèé ïîٌ÷èٍàييûé لàً لَنهٍ ïهًهٌ÷èٍàي
if(counted_bars > 0)
counted_bars–;
else
{
ArrayInitialize(0, EMPTY_VALUE);
ArrayInitialize(1, EMPTY_VALUE);
ArrayInitialize(2, EMPTY_VALUE);
ArrayInitialize(3, EMPTY_VALUE);
ArrayInitialize(4, EMPTY_VALUE);
ArrayInitialize(5, EMPTY_VALUE);
ArrayInitialize(6, EMPTY_VALUE);
}
limit = Bars – counted_bars;
//—- îٌيîâيîé ِèêë
for(int i = limit-1; i >= 0; i–)
{
ExtMapBuffer2[i] = iOsMA(NULL, 0, FastEMA, SlowEMA, SignalSMA, AplyingPrice, i);

dOsMAPrev = iOsMA(NULL, 0, FastEMA, SlowEMA, SignalSMA, AplyingPrice,
i + 1);
if(dOsMAPrev > ExtMapBuffer2[i] || CompareDouble(dOsMAPrev, ExtMapBuffer2[i]))
{
ExtMapBuffer1[i] = ExtMapBuffer2[i];
ExtMapBuffer1[i+1] = dOsMAPrev;
}
else
{
ExtMapBuffer0[i] = ExtMapBuffer2[i];
ExtMapBuffer0[i+1] = dOsMAPrev;
}
ExtMapBuffer5[i] = iMACD(NULL, 0, FastEMA, SlowEMA, SignalSMA,
AplyingPrice, MODE_MAIN, i);
dMACDPrev = iMACD(NULL, 0, FastEMA, SlowEMA, SignalSMA, AplyingPrice,
MODE_MAIN, i + 1);
if(dMACDPrev > ExtMapBuffer5[i] || CompareDouble(dMACDPrev, ExtMapBuffer5[i]))
ExtMapBuffer4[i] = ExtMapBuffer5[i];
else
ExtMapBuffer3[i] = ExtMapBuffer5[i];
ExtMapBuffer6[i] = iMACD(NULL, 0, FastEMA, SlowEMA, SignalSMA,
AplyingPrice, MODE_SIGNAL, i);
}
//—-
return(0);
}
//+——————————————————————+
//| شَيêِèے ًٌàيهيèے نâَُ âهùهٌٍâهييûُ ÷èٌهë. |
//+——————————————————————+
bool CompareDouble(double Number1, double Number2)
{
bool Compare = NormalizeDouble(Number1 – Number2, 8) == 0;
return(Compare);
}
//+——————————————————————+
<pre>[/php]

Click Here to Download

Download Chaikins Volatility indicators

chaiWe make use of this mql file in running some tests . And the good news is, it really works. It’s very compatible in both MT4 and Metatrader 5 edition and can work to some other MT versions as well. If you would like even more similar indicators just like it, ourForex Volatility Indicators division may help you quite a bit.

If you really like or find this Chaikins Volatility is a superb indicator for Forex please don’t fail to remember to rate the indicator. We also request you to create couple of lines in our comment section concerning Chaikins Volatility indicator just like – ways to utilize it or best approach to trade with it. The honest rating and also reviews you offer definitely counts since it will be helpful to Forex investors in their task in taking or choosing indicators.

Obviously, many currency exchange traders will look for greater indicators that will assist them trade more and precisely. And we’ll be very pleased to find out that this free Chaikins Volatility indicator is assisting traders in having the very best deals to enhance their income in return. Assured, we are also doing our best to publish Forex indicators such as Chaikins Volatility on our site. This way, everyone can download it at no cost and help them make intelligent choices and become much better traders in return.

[php]Chaikin’s Volatility</pre>
//+——————————————————————+
//| Chaikin’s Volatility.mq4 |
//| Kalenzo |
//| [email protected] |
//+——————————————————————+
#property copyright “Kalenzo”
#property link “[email protected]

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 DeepSkyBlue

//—- input parameters
extern int iPeriod=10;
extern int maPeriod=10;
//—- buffers
double chakin[];
double hl[];
double emahl[];
//+——————————————————————+
//| Custom indicator initialization function |
//+——————————————————————+
int init()
{
//—- indicators
IndicatorBuffers(3);
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,chakin);

SetIndexBuffer(1,hl);
SetIndexBuffer(2,emahl);
//—-
return(0);
}
//+——————————————————————+
//| Custom indicator deinitialization function |
//+——————————————————————+
int deinit()
{
//—-

//—-
return(0);
}
//+——————————————————————+
//| Custom indicator iteration function |
//+——————————————————————+
int start()
{
int limit;
int counted_bars=IndicatorCounted();
if(counted_bars<0) counted_bars=0;
if(counted_bars>0) counted_bars–;
limit=Bars-counted_bars;
//—-
for(int c = 0 ;c <= limit ;c++) hl[c]=High[c]-Low[c];
for(int e = 0 ;e <= limit ;e++) emahl[e]= iMAOnArray(hl,0,maPeriod,0,MODE_EMA,e);

for(int i = 0 ;i <= limit-20 ;i++)
{

chakin[i] = ( (emahl[i]-emahl[i+iPeriod])/emahl[i+iPeriod] ) *100;
}
//—-
return(0);
}
//+——————————————————————+
<pre>[/php]

Click Here to Download

Download MA ALERT indicators

maaWe make use of this indicator in running some tests . And do you know what, it works brilliantly to what we’ve expected. It is quite compatible in both MT4 (Metatrader 4) and MT5 program and could function to other MT systems also. If you need even more related indicators exactly like it, our Forex Moving Average Indicators section can help you much.

If ever you are settled to make use of this MA ALERT and find this indicator for Forex useful, we will be very happy if you can rate the indicator and also feel free to throw in a few of your feedbacks or opinions, simply post it in the comment section. Together with your remarks, ratings and testimonials, you can even help your fellow Forex currency investors to test such indicators.

So that you can attain the best results foreign currency traders will naturally pick just the best indicator that will work in sync along with their projects. For that fact, we are aiming to give you only the best with the use of our free MA ALERT indicator. Together with the developments, we’re also looking for greater indicators just like the MA ALERT. Which we will eventually upload to the website for the traders to download and use to their hearts content.

 

[php]</pre>
//+——————————————————————+
//| MA_ALERT.mq4 |
//| Kalenzo |
//| [email protected] |
//+——————————————————————+
#property copyright “Kalenzo”
#property link “[email protected]
extern bool makeItPlay = true;
extern int maMethod = 0;
extern int maPeriod = 14;
extern int maShift = 0;
extern int appiledPrice = 0;
int PrevAlertTime = 0;
#property indicator_chart_window
#property indicator_color1 Gold
#property indicator_buffers 1
double maBuffer[];
//+——————————————————————+
//| Custom indicator initialization function |
//+——————————————————————+
int init()
{
//—- indicators
SetIndexStyle(0,DRAW_LINE,0,1);
SetIndexBuffer(0,maBuffer);
//—-
return(0);
}
//+——————————————————————+
//| Custor indicator deinitialization function |
//+——————————————————————+
int deinit()
{
//—-

//—-
return(0);
}
//+——————————————————————+
//| Custom indicator iteration function |
//+——————————————————————+
int start()
{
//—-
int limit;
int counted_bars=IndicatorCounted();
if(counted_bars<0) counted_bars=0;
if(counted_bars>0) counted_bars–;
limit=Bars-counted_bars;
//—-

for(int i = 0 ;i < limit ;i++)
{
maBuffer[i]=iMA(Symbol(),0,maPeriod,maShift,maMethod,appiledPrice,i);
}

double ppMA = NormalizeDouble(iMA(Symbol(),0,maPeriod,maShift,maMethod,appiledPrice,3),4);
double pMA = NormalizeDouble(iMA(Symbol(),0,maPeriod,maShift,maMethod,appiledPrice,2),4);
double cMA = NormalizeDouble(iMA(Symbol(),0,maPeriod,maShift,maMethod,appiledPrice,1),4);

if (CurTime() – PrevAlertTime > Period()*60)
{

if(ppMA < pMA && pMA > cMA)
{
Alert(“MA incerasing”);
PrevAlertTime = CurTime();
}
else if(ppMA > pMA && pMA < cMA)
{
Alert(“MA decerasing”);
PrevAlertTime = CurTime();
}
}

//—-
return(0);
}
//+——————————————————————+
<pre>[/php]

Click Here to Download

Download SHI Mod indicators

shiThe mql file runs in Meta Trader 4 and Metatrader 5 program, also along with other MT versions.

If ever you are settled to employ this SHI Mod and see this indicator for Forex advantageous, we’ll be happy if you can rate the indicator and as well feel free to throw in some of your comments or ideas, simply post it in the comment area. Together with your remarks, ratings and testimonials, you can also help your fellow Forex currency investors to test such indicators.

Needless to say, most Forex investors will find much better indicators that will help them trade more and accurately. And we’ll be really pleased to find out that this free SHI Mod indicator is helping traders in having the top deals to improve their income in return. Rest assured, we are also doing all of our best to publish Forex indicators just like SHI Mod on our site. On this, downloading it at no cost and create savvy choices and become better traders in return is possible.

 

[php]</pre>
//+——————————————————————+
//| SHI_Mod.mq4 |
//| Copyright © 2004, Shurka & Kevin |
//| Corrected&Upgraded by Modest |
//+——————————————————————+
// Modest- èٌïًàâëهي àëمîًèٍى يàُîونهيèے îïîًيîé ٍî÷êè ىهونَ
// îليàًَوهييûىè ôًàêٍàëàىè نëے ïîًٌٍîهيèے ëèيèè êàيàëà
// ؤîلàâëهيà âîçىîويîٌٍü ٍهٌٍèًîâàيèے يà èٌٍîًèè ïًè ïîىîùè ïًîمًàىىû MetaClick.
// دًè ٍهٌٍèًîâàيèè ëèيèè êàيàëà ïًîنîëوà‏ٌٍے â لَنَّهه
#property copyright “Copyright © 2004, Shurka & Kevin ”
#property link “”
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
double ExtMapBuffer1[];
double UpLabel[];

extern int BarsForFract=0;
int CurrentBar=0;
double Step=0;
int B1=-1,B2=-1,iB1=0,iB2=0,flag=0;
int UpDown=0;
double P1=0,P2=0,PP=0,P1f=0,PPf=0;
int i=0,AB=300,BFF=0;
int ishift=0;
double iprice=0;
datetime T1,T2,Tf;
string fileNAME;
//+——————————————————————+
//| Custom indicator initialization function |
//+——————————————————————+
int init()
{
//—- indicators
SetIndexStyle(0,DRAW_ARROW);
SetIndexArrow(0,164);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexEmptyValue(0,0.0);

SetIndexStyle(1,DRAW_ARROW,EMPTY,1,Blue);
SetIndexBuffer(1,UpLabel);
SetIndexArrow(1, 251);
SetIndexEmptyValue(1,0);

return(0);
}
//+——————————————————————+
//| Custor indicator deinitialization function |
//+——————————————————————+
int deinit()
{
//—-
FileDelete(fileNAME);
//—-
return(0);
}

void DelObj()
{
ObjectDelete(“TL1”); ObjectDelete(“TL2”); ObjectDelete(“MIDL”);
ObjectDelete(“Lab1”);ObjectDelete(“Lab2”);ObjectDelete(“Lab3”);
ObjectDelete(“TL1f”);ObjectDelete(“TL2f”);
ObjectDelete(“MyBarLine”);
}

//+——————————————————————+
//| Custom indicator iteration function |
//+——————————————————————+

int start()
{
double iPP,Lab1Val,Lab2Val,Lab3Val;
int MyBar,lastBarTime,h1,ii;
string v1,fileFrame;
//****************************************************************************************
// ×ٍهيèه نàييûُ (ًٌٍîêà) èç âيهّيهمî ôàéëà, ٌôîًىèًîâàييîمî ïًîمًàىىîé MetaClick,
// ïٍَ¸ى ٍûêà â لàً (Z+LeftMouse) َêàçûâà‏ùهé âًهىے, نî êîٍîًîمî ًٌٍîèٌٍے èينèêàٍîً.
// بùهى يَويûé يîىهً لàًà
//****************************************************************************************
switch (Period()) // شîًىèًîâàيèه ÷àٌٍè èىهيè âيهّيهمî ôàéëà
{
case PERIOD_M1: fileFrame=”,M1″;break;
case PERIOD_M5: fileFrame=”,M5″;break;
case PERIOD_M15: fileFrame=”,M15″;break;
case PERIOD_M30: fileFrame=”,M30″;break;
case PERIOD_H1: fileFrame=”,H1″;break;
case PERIOD_H4: fileFrame=”,H4″;break;
case PERIOD_D1: fileFrame=”,Daily”;break;
case PERIOD_W1: fileFrame=”,Weekly”;break;
case PERIOD_MN1: fileFrame=”,Monthly”;break;
}
fileNAME=Symbol()+fileFrame+”.csv”;
h1=FileOpen(Symbol()+fileFrame+”.csv”,FILE_CSV,”;”);
v1 = FileReadString(h1);
FileClose(h1);
Comment(v1);
lastBarTime=StrToTime(v1);
i=0;
while (i<=Bars-1 )
{if (lastBarTime==Time[i])
{ MyBar=i;break;}
i++;
}
MyBar=0;
//**********^^ اàêîي÷èëè èٌêàٍü ïîٌëهنيèé لàً نëے ïîًٌٍîهيèے èينèêàٍîًà ****************
ArrayInitialize(UpLabel,0.0);
if (Bars<MyBar+303) {Alert(“Too little history”);return(-1);}
int counted_bars=IndicatorCounted();
//—-
//if(Bars<AllBars) AllBars=Bars; //return(-1);
//if(AllBars<AB) {Comment(“جàëî لàًîâ”); return(-1);}
//Alert(“MyBar=”,MyBar);
//if ((AllBars==0) || (Bars<AllBars)) AB=Bars; else AB=AllBars; //AB-êîëè÷هٌٍâî îلٌ÷èٍûâàهىûُ لàًîâ
if (BarsForFract>0)
BFF=BarsForFract;
else
{
switch (Period())
{
case 1: BFF=12; break;
case 5: BFF=48; break;
case 15: BFF=24; break;
case 30: BFF=24; break;
case 60: BFF=12; break;
case 240: BFF=15; break;
case 1440: BFF=10; break;
case 10080: BFF=6; break;
default: DelObj(); return(-1); break;
}
}
CurrentBar=2+MyBar; //ٌ÷èٍàهى ٌ ًٍهٍüهمî لàًà, ÷ٍîلû ôًàêٍàë “çàêًهïèëٌے
B1=-1; B2=-1; UpDown=0; flag=0;

while(((B1==-1) || (B2==-1)) && (CurrentBar<(AB+MyBar)))
{
//UpDown=1 çيà÷èٍ ïهًâûé ôًàêٍàë يàéنهي ٌâهًَُ, UpDown=-1 çيà÷èٍ ïهًâûé ôًàêٍàë
//يàéنهي ٌيèçَ, UpDown=0 çيà÷èٍ ôًàêٍàë هù¸ يه يàéنهي.
//آ1 è آ2 – يîىهًà لàًîâ ٌ ôًàêٍàëàىè, ÷هًهç يèُ ًٌٍîèى îïîًيَ‏ ëèيè‏.
//ذ1 è ذ2 – ٌîîٍâهٌٍٍâهييî ِهيû ÷هًهç êîٍîًûه لَنهى ëèيè‏ ïًîâîنèٍü
// if (CurrentBar==4 ) Alert(“CurrentBar=”,CurrentBar,” “,”BFF=”,BFF);

if((UpDown<1) && (CurrentBar==Lowest(Symbol(),Period(),MODE_LOW,BFF*2+1,CurrentBar-BFF)))
// آûًàوهيèه CurrentBar-BFF ىîوهٍ لûٍü â نàي ٌëَ÷àه îًٍèِàٍهëüيûى. حî âًîنه ًàلîٍàهٍ

{
if(UpDown==0) { UpDown=-1; B1=CurrentBar; iB1=CurrentBar; P1=Low[B1];}
else { B2=CurrentBar; iB2=CurrentBar; P2=Low[B2];}
}
if((UpDown>-1) && (CurrentBar==Highest(Symbol(),Period(),MODE_HIGH,BFF*2+1,CurrentBar-BFF)))

{
if(UpDown==0) { UpDown=1; B1=CurrentBar; iB1=CurrentBar; P1=High[B1];}
else { B2=CurrentBar; iB2=CurrentBar; P2=High[B2];}
}
CurrentBar++;
}
if((B1==-1) || (B2==-1)) {DelObj(); return(-1);} // ايà÷èٍ يه يàّëè ôًàêٍàëîâ ًٌهنè 300 لàًîâ 😎
Step=(P2-P1)/(B2-B1);//آû÷èٌëèëè ّàم, هٌëè îي ïîëîوèٍهëüيûé, ٍî êàيàë يèٌُîنےùèé
P1=P1-(B1-MyBar)*Step; B1=0+MyBar;//ïهًهٌٍàâëےهى ِهيَ è ïهًâûé لàً ê يَë‏ (çيà÷هيèه îïîًيîé ëèيèè يà 0 لàًه)

//ہ ٍهïهًü îïîًيَ‏ ٍî÷êَ ïًîٍèâîïîëîويîé ëèيèè êàيàëà.
ishift=0+MyBar; iprice=0;

//Alert(UpDown);
if(UpDown==1)
{
// بٌïًàâëهيî!! خïîًيَ‏ ٍî÷êَ لَنهى èٌêàٍü جإئؤس îليàًَوهييûىè ôًàêٍàëàىè,
// à يه ٌ 0-مî (MyBar) لàًà. iB1-‎ٍî يه èçىهيهييûé B1

//PP=Low[2+MyBar]-(2)*Step;

PP=Low[2+iB1]-(2)*Step;
iPP=Low[2+iB1]-(2)*Step;
ii=2+iB1;
//for(i=3+MyBar;i<=B2;i++)
for(i=3+iB1;i<=B2;i++)
{
//if(Low[i]<PP+Step*(i-MyBar)) { PP=Low[i]-(i-MyBar)*Step; ii=i;}
if(Low[i]<iPP+Step*(i-iB1))
//PP-çيà÷هيèه ëèيèè يà ïîٌëهنيهى لàًه
// iPP-çيà÷هيèه ëèيèè يà لàًه iB1 -ïًàâûé ôًàêٍàë
{ PP=Low[i]-(i-MyBar)*Step; ii=i;
iPP=Low[i]-(i-iB1)*Step;
}
}

//Alert(iB1,” “,iB2,” “,ii,” “,”Step=”,Step,” “,”PP=”,PP);
//Lab1Val=(High[iB1]+5*Point); Lab2Val=(High[iB2]+5*Point); Lab3Val=(Low[ii]-5*Point);
UpLabel[iB1]=High[iB1]+5*Point;
UpLabel[iB2]=High[iB2]+5*Point;
UpLabel[ii]=Low[ii]-5*Point;

//Alert(iB1,” “,ii,” “,iB2,” “,”Step=”,Step,” “,”PP=”,PP,” “,”Lab1Val=”,Lab1Val);
if(Low[0+MyBar]<PP) {ishift=0+MyBar; iprice=PP;}
if(Low[1+MyBar]<PP+Step) {ishift=1+MyBar; iprice=PP+Step;}
if(High[0+MyBar]>P1) {ishift=0+MyBar; iprice=P1;}
if(High[1+MyBar]>P1+Step) {ishift=1+MyBar; iprice=P1+Step;}
}
else //ًٍهين âيèç
{
PP=High[2+MyBar]-(2)*Step;
iPP=High[2+iB1]-(2)*Step;
ii=2+iB1;
//for(i=3+MyBar;i<=B2;i++)
for(i=3+iB1;i<=B2;i++)
{
if(High[i]>iPP+Step*(i-iB1)) { PP=High[i]-(i-MyBar)*Step;ii=i;
iPP=High[i]-(i-iB1)*Step;
} //èùهى çيà÷هيèه âهًُيهé ëèيèè يà 0 لàًه
}

//Lab1Val=(Low[iB1]-5*Point);Lab2Val=(Low[iB2]-5*Point);Lab3Val=(High[ii]+5*Point);
UpLabel[iB1]=Low[iB1]-5*Point;
UpLabel[iB2]=Low[iB2]-5*Point;
UpLabel[ii]=High[ii]+5*Point;

//Alert(iB1,” “,iB2,” “,”ii=”,ii,” “,”Step=”,Step,” “,”PP=”,PP,” “,
// “Lab1Val=”,Lab1Val,”Lab3Val=”,Lab3Val);

// îïًهنهëےهى, لûëî ëè ïهًهٌه÷هيèه ëèيèé êàيàëà يà 0 èëè 1 لàًàُ(÷ٍîلû ٌٍàâèٍü ïٌèٌَ)
if(Low[0+MyBar]<P1) {ishift=0+MyBar; iprice=P1;}
if(Low[1+MyBar]<P1+Step) {ishift=1+MyBar; iprice=P1+Step;}
if(High[0+MyBar]>PP) {ishift=0+MyBar; iprice=PP;}
if(High[1+MyBar]>PP+Step) {ishift=1+MyBar; iprice=PP+Step;}
}
//زهïهًü ïهًهٌٍàâèى êîيه÷يَ‏ ِهيَ è لàً يà ہآ, ÷ٍîلû ëèيèè êàيàëà ًèٌîâàëèٌü ïîنëèييهه
P2=P1+AB*Step;
T1=Time[B1]; T2=Time[AB+MyBar];

//إٌëè يه لûëî ïهًهٌه÷هيèے êàيàëà, ٍî 0, èيà÷ه ٌٍàâèى ïٌèٌَ.
//if(iprice!=0) ExtMapBuffer1[ishift]=iprice;
DelObj();

//Alert(“B1=”,B1,” “,”B2=”,AB+MyBar,” “,”AB=”,AB,” “,”MyBar=”,MyBar);
// Alert(“T1=”,T1,” “,”T2=”,T2);

//***************************************** ذèٌَهى ëèيèè êàيàëà ************************
ObjectCreate(“TL1”,OBJ_TREND,0,T2,PP+Step*(AB),T1,PP);
ObjectSet(“TL1”,OBJPROP_COLOR,Tomato);
ObjectSet(“TL1”,OBJPROP_WIDTH,2);
ObjectSet(“TL1”,OBJPROP_STYLE,STYLE_SOLID);
ObjectSet(“TL1”,OBJPROP_RAY,False);
ObjectCreate(“TL2”,OBJ_TREND,0,T2,P2,T1,P1);
ObjectSet(“TL2”,OBJPROP_COLOR,Tomato);
ObjectSet(“TL2”,OBJPROP_WIDTH,2);
ObjectSet(“TL2”,OBJPROP_STYLE,STYLE_SOLID);
ObjectSet(“TL2”,OBJPROP_RAY,False);
ObjectCreate(“MIDL”,OBJ_TREND,0,T2,(P2+PP+Step*AB)/2,T1,(P1+PP)/2);
ObjectSet(“MIDL”,OBJPROP_COLOR,Tomato);
ObjectSet(“MIDL”,OBJPROP_WIDTH,1);
ObjectSet(“MIDL”,OBJPROP_STYLE,STYLE_DOT);
ObjectSet(“MIDL”,OBJPROP_RAY,False);

//*********************************** ذèٌَهى ïًîنîëوهيèه êàيàëà ************************
if (MyBar>30) {Tf=Time[MyBar-30];
PPf=PP-Step*30; P1f=P1-Step*30;
}
else {Tf=Time[0];PPf=PP-MyBar*Step; P1f=P1-MyBar*Step;
}
ObjectCreate(“TL1f”,OBJ_TREND,0,T1,PP,Tf,PPf);
ObjectSet(“TL1f”,OBJPROP_COLOR,Green);
ObjectSet(“TL1f”,OBJPROP_WIDTH,1);
ObjectSet(“TL1f”,OBJPROP_STYLE,STYLE_DOT);
ObjectSet(“TL1f”,OBJPROP_RAY,False);
ObjectCreate(“TL2f”,OBJ_TREND,0,T1,P1,Tf,P1f);
ObjectSet(“TL2f”,OBJPROP_COLOR,Green);
ObjectSet(“TL2f”,OBJPROP_WIDTH,1);
ObjectSet(“TL2f”,OBJPROP_STYLE,STYLE_DOT);
ObjectSet(“TL2f”,OBJPROP_RAY,False);

//************************* خٍىه÷àهى êëèêيٍَûé لàً ************************************
if (MyBar>0)
{
ObjectCreate(“MyBarLine”,OBJ_VLINE,0,Time[MyBar],High[MyBar]);
ObjectSet(“MyBarLine”,OBJPROP_COLOR,MediumOrchid);
ObjectSet(“MyBarLine”,OBJPROP_WIDTH,1);
ObjectSet(“MyBarLine”,OBJPROP_STYLE,STYLE_DOT);
}
//—-
return(0);
}
//+——————————————————————+
<pre>[/php]

Click Here to Download

Download GG RSI CCI indicators

ccccAs matter of fact, this mq4 works with the various sort of Meta Trader like the MT4 (Metatrader 4) and Meta Trader 5 as we have tried it. With these test we could assure the buyers and user that there will be no issues in compatibility .

In case you’ve tested employing this GG RSI CCI, then you should take time in rating this indicator particularly if you think it is a highly effective indicator for Forex. We don’t discourage any comments or even reply to the performance of the GG RSI CCI indicator. With the help of your comments it will be simple for currency exchange traders to decide on which indicators must they use.

Obviously, currency traders would only want to get the ideal indicators to deliver success in this venture. With that in mind, we’re also doing our best to give you the finest experience through the aid of this free GG RSI CCI indicator. We’re also also continuously searching for the very best Forex indicators just like the GG RSI CCI. Once we have discovered such indicators, then we’ll upload it to our site so that traders like you will be able to download and make use of them.

 

[php]</pre>
//+——————————————————————+
//| GG-RSI-CCI.mq4 |
//| Copyright © 2009, GGekko |
//| http://www.fx-ggekko.com |
//+——————————————————————+
#property copyright “Copyright © 2009, GGekko”
#property link “http://www.fx-ggekko.com”

//—- indicator settings
#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 YellowGreen
#property indicator_color2 Gold
#property indicator_color3 OrangeRed
#property indicator_width1 2
#property indicator_width2 2
#property indicator_width3 2
#property indicator_minimum 0
#property indicator_maximum 1.5

//—- indicator parameters
extern string __Copyright__ = “www.fx-ggekko.com”;
extern int Avg_Period1 = 8;
extern int Avg_Period2 = 14;
extern int Ind_Period = 20;

//—- indicator buffers
double BufferUp[];
double BufferFlat[];
double BufferDown[];

double ind1[];
double ind2[];

double ind3[];
double ind4[];
double ind5[];
double ind6[];
//+——————————————————————+
//| Custom indicator initialization function |
//+——————————————————————+
int init()
{
//—- drawing settings
IndicatorBuffers(5);
SetIndexStyle(0,DRAW_HISTOGRAM);
SetIndexStyle(1,DRAW_HISTOGRAM);
SetIndexStyle(2,DRAW_HISTOGRAM);

//—- indicator buffers mapping
SetIndexBuffer(0,BufferUp);
SetIndexBuffer(1,BufferFlat);
SetIndexBuffer(2,BufferDown);
SetIndexBuffer(3,ind1);
SetIndexBuffer(4,ind2);

//—- name for DataWindow and indicator subwindow label
IndicatorShortName(“GG-RSI-CCI (“+Avg_Period1+”,”+Avg_Period2+”,”+Ind_Period+”) * www.fx-ggekko.com * “);

//—- initialization done
return(0);
}

int start()
{
int limit;
int counted_bars=IndicatorCounted();
//—- last counted bar will be recounted
if(counted_bars>0) counted_bars–;
limit=Bars-counted_bars;
//—-

ArrayResize(ind3,limit);
ArrayResize(ind4,limit);
ArrayResize(ind5,limit);
ArrayResize(ind6,limit);
for(int i=0; i<limit; i++)
ind1[i]=iRSI(NULL,0,Ind_Period,PRICE_CLOSE,i);

for(i=0; i<limit; i++)
ind2[i]=iCCI(NULL,0,Ind_Period,PRICE_CLOSE,i);
for(i=0; i<limit; i++)
ind3[i]=iMAOnArray(ind1,0,Avg_Period1,0,MODE_SMMA,i);

for(i=0; i<limit; i++)
ind4[i]=iMAOnArray(ind1,0,Avg_Period2,0,MODE_SMMA,i);

for(i=0; i<limit; i++)
ind5[i]=iMAOnArray(ind2,0,Avg_Period1,0,MODE_SMMA,i);

for(i=0; i<limit; i++)
ind6[i]=iMAOnArray(ind2,0,Avg_Period2,0,MODE_SMMA,i);

for(i=0; i<limit; i++)
{
if(ind3[i]>ind4[i] && ind5[i]>ind6[i])
{
BufferUp[i]=1;
BufferFlat[i]=EMPTY_VALUE;
BufferDown[i]=EMPTY_VALUE;
}
else if(ind3[i]<ind4[i] && ind5[i]<ind6[i])
{
BufferUp[i]=EMPTY_VALUE;
BufferFlat[i]=EMPTY_VALUE;
BufferDown[i]=1;
}
else
{
BufferUp[i]=EMPTY_VALUE;
BufferFlat[i]=1;
BufferDown[i]=EMPTY_VALUE;
}
}

//—- done
return(0);
}
//+——————————————————————+
<pre>[/php]

Click Here to Download

Download GMMA Long indicators

gmmafantastic indicator since we can just located it on the web and the nice thing about it is that it is a free foreign exchange trading indicator.

Most likely this indicator will work with all the diverse types of MT out there, after properly testing it with MT4(Metatrader 4)and MT5(Metatrader 5). With these test we can assure the buyers and user there will be no issues in compatibility .

When you have tried employing this GMMA Long, then you should take some time in rating this indicator particularly if you find it an efficient indicator for Forex. We would also appreciate when you give some testimonials, reviews, or some tips regarding using the GMMA Long indicator. Through the help of your remarks it will likely be easy for Forex traders to select which indicators should they use.

We, the foreign currency investors are consistently looking for better indicators for an even more accurate trade. And we’re hoping that you’ll be assisted by this GMMA Long indicator in finding a more correct trade or even having better choices for trade and earn better income. We place a whole lot of effort in finding the very best Forex indicators such as GMMA Long. After which, we can then get them uploaded on our website which in turn present individuals a chance to download it with no money charges and include a lot more better traders.

 

[php]</pre>
//+——————————————————————+
//| Guppy Mulitple Moving Average (Long).mq4 |
//| Code written by – Matt Trigwell |
//| |
//+——————————————————————+

// ***** INSTRUCTIONS *****
// Add the GMMA Short indicator and the GMMA Long indicator to your charts.
// This is the GMMA Long indicator

// ***** For information on how to use this fantastic indicator *****
// http://www.guppytraders.com/
// http://www.market-analyst.com/kb/article.php/Guppy_Multiple_Moving_Average
// http://tradermike.net/2004/05/another_look_at_multiple_moving_averages
#property copyright “Code written by – Matt Trigwell”

#property indicator_chart_window
#property indicator_buffers 6
#property indicator_color1 Blue
#property indicator_color2 Blue
#property indicator_color3 Blue
#property indicator_color4 Blue
#property indicator_color5 Blue
#property indicator_color6 Blue

//—- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double ExtMapBuffer5[];
double ExtMapBuffer6[];

//+——————————————————————+
//| Custom indicator initialization function |
//+——————————————————————+
int init()
{
//—- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(2,DRAW_LINE);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexStyle(3,DRAW_LINE);
SetIndexBuffer(3,ExtMapBuffer4);
SetIndexStyle(4,DRAW_LINE);
SetIndexBuffer(4,ExtMapBuffer5);
SetIndexStyle(5,DRAW_LINE);
SetIndexBuffer(5,ExtMapBuffer6);
//—-
return(0);
}

int deinit()
{
return(0);
}

int start()
{
int i,j,limit,counted_bars=IndicatorCounted();

if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars–;
limit=Bars-counted_bars;

for(i=0; i<limit; i++){
ExtMapBuffer1[i]=iMA(NULL,0,30,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer2[i]=iMA(NULL,0,35,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer3[i]=iMA(NULL,0,40,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer4[i]=iMA(NULL,0,45,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer5[i]=iMA(NULL,0,50,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer6[i]=iMA(NULL,0,60,0,MODE_EMA,PRICE_CLOSE,i);
}

return(0);
}
//+——————————————————————+
<pre>[/php]

Click Here to Download

Download Bollinger Lines Profit indicator

bollAll MT systems, work well with this mql file, despite MT4 and MT5 (Metatrader 5) programs.

In case you have experience the usage of this Bollinger Lines Profit, particularly if you believe this indicator is ideal for Forex, marking its performance is inspired. We would also appreciate when you give several testimonials, feedbacks, or some suggestions about using the Bollinger Lines Profit indicator. With the aid of your remarks it will be easy for currency traders to pick which indicators should they make use of.

For the nature of the work, foreign currency investors will ultimately pick the product which offer just the best and dependable results . For that fact, we are trying to give you only the very best with the use of our cost-free Bollinger Lines Profit indicator. Along with the improvements, we’re also searching for much better indicators like the Bollinger Lines Profit. Once we have discovered such indicators, then we’ll publish it to our site so that traders just like you will be able to download and use them.

 

[php]</pre>
//+——————————————————————+
//| BLines_Profi_v1.mq4 |
//| Profi_R |
//+——————————————————————+
#property copyright “Copyright © 2005, MetaQuotes Software Corp.”
#property link “Profi_R”

#property indicator_chart_window
#property indicator_buffers 8
#property indicator_color1 Blue
#property indicator_color2 DodgerBlue
#property indicator_color3 Yellow
#property indicator_color4 Yellow
#property indicator_color5 Black
#property indicator_color6 White
#property indicator_color7 Black
#property indicator_color8 White
//—- input parameters
extern int Range=5;
extern int NextTF=240;
extern double FiboLevel=0.618;
//—- buffers
double StBPoint[];
double DBPoint[];
double StBStep[];
double DBStep[];
double StSupport[];
double DSupport[];
double StResistance[];
double DResistance[];
//—-
int d_b,Displacement;

//+——————————————————————+
//| Custom indicator initialization function |
//+——————————————————————+
int init()
{
//—- indicators
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2);
SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,2);
SetIndexStyle(2,DRAW_LINE,STYLE_SOLID,2);
SetIndexStyle(3,DRAW_LINE,STYLE_SOLID,2);
SetIndexStyle(4,DRAW_LINE,STYLE_DOT);
SetIndexStyle(5,DRAW_LINE,STYLE_DOT);
SetIndexStyle(6,DRAW_LINE,STYLE_DOT);
SetIndexStyle(7,DRAW_LINE,STYLE_DOT);
SetIndexBuffer(0,StBPoint);
SetIndexBuffer(1,DBPoint);
SetIndexBuffer(2,StBStep);
SetIndexBuffer(3,DBStep);
SetIndexBuffer(4,StSupport);
SetIndexBuffer(5,DSupport);
SetIndexBuffer(6,StResistance);
SetIndexBuffer(7,DResistance);
SetIndexLabel(0,”Static level of balance”);
SetIndexLabel(1,”Dynamic level of balance”);
SetIndexLabel(2,”Static steps of balance”);
SetIndexLabel(3,”Dynamic steps of balance”);
SetIndexLabel(4,”Static level of support (Fibo”+FiboLevel*100+”%)”);
SetIndexLabel(5,”Dynamic level of support (Fibo”+FiboLevel*100+”%)”);
SetIndexLabel(6,”Static level of resistance (Fibo”+FiboLevel*100+”%)”);
SetIndexLabel(7,”Dynamic level of resistance (Fibo”+FiboLevel*100+”%)”);
string short_name;
short_name=”Lines of balance (“+Range+”,”+NextTF+”,”+FiboLevel*100+”)”;
IndicatorShortName(short_name);
if( NextTF>Period() )
{
d_b=Range*NextTF/Period();
if( NextTF<10080)
{
Displacement=NextTF/Period();
}
else
{
if( NextTF==10080 )
{
Displacement=7200/Period();
}
else
{
if( NextTF==43200 )
{
Displacement=31680/Period();
}
}
}
}
else
{
return(-1);
}
SetIndexDrawBegin(0,d_b);
SetIndexDrawBegin(1,d_b);
SetIndexDrawBegin(2,d_b);
SetIndexDrawBegin(3,d_b);
SetIndexDrawBegin(4,d_b);
SetIndexDrawBegin(5,d_b);
SetIndexDrawBegin(6,d_b);
SetIndexDrawBegin(7,d_b);
SetIndexShift(0,Displacement);
SetIndexShift(2,Displacement);
SetIndexShift(4,Displacement);
SetIndexShift(6,Displacement);
//—-
return(0);
}
//+——————————————————————+
//| Custom indicator iteration function |
//+——————————————————————+
int start()
{
int cb,limit,sbb_index,sbb_Aux_i,sbe_Aux_i,i;
int counted_bars=IndicatorCounted();
datetime Corresp_bbbnTime;
double StHigh,StLow,DHigh,DLow,SStBStep,SDBStep;
//—-
if( NextTF<=Period() )
{
Alert(“Incorrect parameter NextTF, it should be more current TF!”);
return(-1);
}
if( counted_bars<0 )
{
return(-1);
}
else
{
if( Bars-1-counted_bars>Bars-1-d_b )
{
limit=Bars-1-d_b;
}
else
{
if( Bars-1-counted_bars>=0 )
{
limit=Bars-1-counted_bars;
}
else
{
limit=0;
}
}
}
limit=Bars-1-counted_bars;
//—-
for(cb=limit;cb>=0;cb–)
{
Corresp_bbbnTime=NormTimeBarBegin(Time[cb],NextTF);
sbb_index=n_iBarShift(Corresp_bbbnTime,Period());
StHigh=High[Highest(NULL,0,MODE_HIGH,sbb_index-cb+1,cb)];
StLow=Low[Lowest(NULL,0,MODE_LOW,sbb_index-cb+1,cb)];
StBPoint[cb]=MathRound((Close[cb]+StHigh+StLow)/3/Point)*Point;
StSupport[cb]=StBPoint[cb]-MathRound((StHigh-StLow)*FiboLevel/Point)*Point;
StResistance[cb]=StBPoint[cb]+MathRound((StHigh-StLow)*FiboLevel/Point)*Point;
if( cb<sbb_index )
{
for(i=cb+1;i<=sbb_index;i++)
{
StBPoint[i]=StBPoint[cb];
StSupport[i]=StSupport[cb];
StResistance[i]=StResistance[cb];
}
}
DHigh=High[Highest(NULL,0,MODE_HIGH,Displacement,cb)];
DLow=Low[Lowest(NULL,0,MODE_LOW,Displacement,cb)];
DBPoint[cb]=MathRound((Close[cb]+DHigh+DLow)/3/Point)*Point;
DSupport[cb]=DBPoint[cb]-MathRound((DHigh-DLow)*FiboLevel/Point)*Point;
DResistance[cb]=DBPoint[cb]+MathRound((DHigh-DLow)*FiboLevel/Point)*Point;
SStBStep=StBPoint[cb];
sbe_Aux_i=sbb_index+1;
for(i=1;i<Range;i++)
{
Corresp_bbbnTime=NormTimeBarBegin(Time[sbe_Aux_i],NextTF);
sbb_Aux_i=n_iBarShift(Corresp_bbbnTime,Period());
SStBStep+=StBPoint[sbb_Aux_i];
sbe_Aux_i=sbb_Aux_i+1;
}
StBStep[cb]=MathRound(SStBStep/Range/Point)*Point;
if( cb<sbb_index )
{
for(i=cb+1;i<=sbb_index;i++)
{
StBStep[i]=StBStep[cb];
}
}
SDBStep=DBPoint[cb];
datetime sbbt_dif,bbbt_aux_b,bbbt_aux_s,t_aux;
int i_aux;
sbbt_dif=NormTimeBarBegin(Time[cb],Period())-NormTimeBarBegin(Time[cb],NextTF);
for(i=1;i<Range;i++)
{
bbbt_aux_b=NormTimeBarBegin(iTime(NULL,NextTF,n_iBarShift(Time[cb],NextTF)+i),NextTF);
bbbt_aux_s=NormTimeBarBegin(Time[cb+i*Displacement],NextTF);
if( bbbt_aux_b!=bbbt_aux_s )
{
t_aux=MathMax(bbbt_aux_b,bbbt_aux_s);
i_aux=n_iBarShift(t_aux+sbbt_dif,Period());
}
else
{
i_aux=n_iBarShift(bbbt_aux_b+sbbt_dif,Period());
}
SDBStep+=DBPoint[i_aux];
}
DBStep[cb]=MathRound(SDBStep/Range/Point)*Point;
}
//—-
return(0);
}

datetime NormTimeBarBegin(datetime intime, int TF)
{
//—-
datetime outtime;
if(TF!=10080)
{
outtime=MathFloor(intime/TF/60)*TF*60;
}
else
{
outtime=MathFloor((intime+345600)/TF/60)*TF*60-345600;
}

//—-
return(outtime);
}

int n_iBarShift(datetime intime, int TF)
{
//—-
int bindex,b_count;
datetime TArray[];
b_count=ArrayCopySeries(TArray,MODE_TIME,Symbol(),TF);
if( b_count<1 )
{
Alert(“حهُâàٍêà نàييûُ!”);
}
else
{
bindex=ArrayBsearch(TArray,NormTimeBarBegin(intime,TF),0,0,MODE_ASCEND) ;
}
//—-
return(bindex);
}
<pre>
[/php]

Click Here to Download