[Archive!] I will write any expert or indicator for free. - page 62

 
Roman.:

Relevant... "Have a good time!"
Shit, where's the admin, you can't be on the forum! 5th grade.
 

/safety-summer-vacation-activated-schoolboys/

 

Hello!

I need an indicator based on the TradeSig, so its scale of amplitudes would be the same as Williams' in %, and the amplitude range would fit into the scale of levels from 0% to -100%.

P.S. It is necessary, because TradeSig "moves away" when indicators are superimposed on each other.

My thanks in advance.

My respect.

Files:
tradesig.mq4  3 kb
 
Hello esteemed traders. I have a very good channel indicator that shows the trend very well on the quotes history, but on the real account it overdraws. If you do not know how to use it, you may ask: "How much time do I have left when I do not know what to do with it? I will be very grateful.

//+------------------------------------------------------------------+
//| Multi.Period.mq4 |
//| Copyright © 2010, Vladimir Hlystov |
//| cmillion@narod.ru |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2010, Vladimir Hlystov"
#property link "http://cmillion.narod.ru"
//+------------------------------------------------------------------+
#property indicator_chart_window
#property indicator_buffers 8
#property indicator_color1 Lime
#property indicator_width1 1
#property indicator_color2 Lime
#property indicator_width2 1
#property indicator_color3 Blue
#property indicator_width3 1
#property indicator_color4 Blue
#property indicator_width4 1
#property indicator_color5 Green
#property indicator_width5 1
#property indicator_color6 Green
#property indicator_width6 1
#property indicator_color7 Red
#property indicator_width7 1
#property indicator_color8 Red
#property indicator_width8 1
//---- input parameters
/*
PERIOD_M1 1 1 minute
PERIOD_M5 5 5 minutes
PERIOD_M15 15 15 minute
PERIOD_M30 30 30 minute
PERIOD_H1 60 1 hour
PERIOD_H4 240 4 hours
PERIOD_D1 1440 1 day
PERIOD_W1 10080
PERIOD_MN1 43200
*/
extern int timeframe1 = 5; //Period. Can be one of the chart periods. 0 means the period of the current chart.
extern int timeframe2 = 15; //Period. Can be one of the chart's periods. 0 means period of the current chart
extern int timeframe3 = 30; //Period. Can be one of the chart's periods. 0 means period of the current chart
extern int timeframe4 = 60; //Period. Can be one of the chart's periods. 0 means the period of the current chart

//---- buffers
double Buffer1[];
double Buffer2[];
double Buffer3[];;
double Buffer4[]; double Buffer5[];
double Buffer5[];
double Buffer6[];
double Buffer7[];
double Buffer8[];
//+------------------------------------------------------------------+
int init()
{
if (timeframe1<Period()) timeframe1=Period();
if (timeframe2<=timeframe1) timeframe2=next_period(timeframe1+1);
if (timeframe3<=timeframe2) timeframe3=next_period(timeframe2+1);
if (timeframe4<=timeframe3) timeframe4=next_period(timeframe3+1);
//---- indicator lines
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,Buffer1);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,Buffer2);
SetIndexStyle(2,DRAW_LINE);
SetIndexBuffer(2,Buffer3);
SetIndexStyle(3,DRAW_LINE);
SetIndexBuffer(3,Buffer4);
SetIndexStyle(4,DRAW_LINE);
SetIndexBuffer(4,Buffer5);
SetIndexStyle(5,DRAW_LINE);
SetIndexBuffer(5,Buffer6);
SetIndexStyle(6,DRAW_LINE);
SetIndexBuffer(6,Buffer7);
SetIndexStyle(7,DRAW_LINE);
SetIndexBuffer(7,Buffer8);
//----
SetIndexLabel(0, "4TF "+StrPer(timeframe1)+StrPer(timeframe2)+StrPer(timeframe3)+StrPer(timeframe4));
return(0);
}
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
if(counted_bars>0) counted_bars--;
int limit=Bars-counted_bars;
for(int i=0; i<limit; i++)
{
Buffer1[i] = iMA(NULL,timeframe1,1,0,0,2,iBarShift(NULL,timeframe1,Time[i],false));
Buffer2[i] = iMA(NULL,timeframe1,1,0,0,3,iBarShift(NULL,timeframe1,Time[i],false));
Buffer3[i] = iMA(NULL,timeframe2,1,0,0,2,iBarShift(NULL,timeframe2,Time[i],false));
Buffer4[i] = iMA(NULL,timeframe2,1,0,0,3,iBarShift(NULL,timeframe2,Time[i],false));
Buffer5[i] = iMA(NULL,timeframe3,1,0,0,2,iBarShift(NULL,timeframe3,Time[i],false));
Buffer6[i] = iMA(NULL,timeframe3,1,0,0,3,iBarShift(NULL,timeframe3,Time[i],false));
Buffer7[i] = iMA(NULL,timeframe4,1,0,0,2,iBarShift(NULL,timeframe4,Time[i],false));
Buffer8[i] = iMA(NULL,timeframe4,1,0,0,3,iBarShift(NULL,timeframe4,Time[i],false));
}
return(0);
}
//+------------------------------------------------------------------+
int next_period(int per)
{
if (per > 43200) return(0);
if (per > 10080) return(43200);
if (per > 1440) return(10080);
if (per > 240) return(1440);
if (per > 60) return(240);
if (per > 30) return(60);
if (per > 15) return(30);
if (per > 5) return(15);
if (per > 1) return(5);
if (per == 1) return(1);
if (per == 0) return(Period())
}
//+------------------------------------------------------------------+
string StrPer(int per)
{
if (per == 1) return(" M1 ");
{ if (per == 5) return(" M5 ");
if (per == 15) return(" M15 ");
if (per == 30) return(" M30 ");
if (per == 60) return(" H1 ");
if (per == 240) return(" H4 ");
if (per == 1440) return(" D1 ");
if (per == 10080) return(" W1 ");
if (per == 43200) return(" MN1 ");
return("period error");
}
//+------------------------------------------------------------------+
 
sergii7777777:

Hello esteemed traders. I have a very good channel indicator that shows the trend very well on the quotes history, but on the real account it overdraws. If you do not know how to use it, you may ask: "How much time do I have left when I do not know what to do with it? I will be very grateful.

It does not re-draw - it just changes the channel as the price moves
 
if it were written so that it would draw a channel on real quotes the way it does when tested on quote history, that would be fantastic. 100% grail.
 
sergii7777777:
If it were written in such a way that it would draw the channel on real quotes the way it is tested on the quotes history, it would be fantastic. 100% grail.


what do you mean by "real quotes" - quotes that do not exist yet or quotes that are just about to appear?

The indicator builds a channel based on the quotes available at the moment.

When new quotes come in - the channel changes - narrows, expands - because the situation changes.

or is it unclear?

 
sergii7777777:
If it were written so that it would draw a channel on real quotes the way it is tested on the history of quotes, it would be fantastic. 100% grail.

Don't write it that way. You just need to understand that your EA should work at the speed of the oldest TF.

The Expert Advisor should receive time data from the bar that has already been recorded on the oldest timeframe.

Then your Expert Advisor will not have problems with signal overshoot.

 

Hello! In the indicator the signals appear on the bar at the time of the beam ZZ, on the working one everything is correct.

Decided to watch the older TF (working M30, H1) by adding the TF parameter ... kludah came out (the signals are not on those bars, and the incorrect display beam)

Where did I mess up ?...advise please.Thanks in advance!!!

//+------------------------------------------------------------------+
//| Dinapoli ZZ (ZigZag).mq4 |
//| rewritten by CrazyChart |
//| |
//+------------------------------------------------------------------+
#property copyright "rewritten by CrazyChart"
#property link ""

#property indicator_chart_window
#property indicator_buffers 5
#property indicator_color1 Red
#property indicator_color2 Yellow
#property indicator_color3 Aqua
#property indicator_color4 Green
#property indicator_color5 Orchid
//---- input parameters
extern inttern barn=1000;
extern Length=6;
extern inttern TF = 0;
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double ExtMapBuffer5[];
//double ExtMapBuffer2[];
//+------------------------------------------------------------------+
//| Custom indicator initialisation function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexEmptyValue(0,0.0);
SetIndexStyle(0,DRAW_SECTION);
SetIndexBuffer(0,ExtMapBuffer1);

SetIndexStyle(1,DRAW_ARROW);
SetIndexArrow(1,159);
SetIndexBuffer(1,ExtMapBuffer2);

SetIndexStyle(2,DRAW_ARROW);
SetIndexArrow(2,159);
SetIndexBuffer(2,ExtMapBuffer3);

SetIndexStyle(3,DRAW_ARROW);
SetIndexArrow(3,186);
SetIndexBuffer(3,ExtMapBuffer4);

SetIndexStyle(4,DRAW_ARROW);
SetIndexArrow(4,187);
SetIndexBuffer(4,ExtMapBuffer5);





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

return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
int shift,Swing,Swing_n,i,uzl,zu,zd,mv;
double LL,HH,BH,BL,NH,NL,shf;
double Uzel[10000][3];
string text;
// loop from first bar to current bar (with shift=0).
Swing_n=0;Swing=0;uzl=0;
BH=iHigh(NULL, TF, barn);BL=iLow(NULL, TF, barn);zu=barn;zd=barn;

for (shift=barn;shift>=0;shift--) {
ExtMapBuffer2[shift]=EMPTY_VALUE;
ExtMapBuffer3[shift]=EMPTY_VALUE;
ExtMapBuffer4[shift]=EMPTY_VALUE;
ExtMapBuffer5[shift]=EMPTY_VALUE;
shf=0.2;
LL=10000000;HH=-100000000;
for (i=shift+Length;i>=shift+1;i--) {
if (iLow(NULL, TF,i)< LL) {LL=iLow(NULL, TF,i);}
if (iHigh(NULL, TF,i)>HH) {HH=iHigh(NULL, TF,i);}
}


if (iLow(NULL, TF,shift)<LL && iHigh(NULL, TF,shift)>HH){
Swing=2;
if (Swing_n==1) {zu=shift+1;}
if (Swing_n==-1) {zd=shift+1;}
} else {
if (iLow(NULL, TF,shift)<LL) {Swing=-1;}
if (iHigh(NULL,TF,shift)>HH) {Swing=1;}
}

if (Swing!=Swing_n && Swing_n!=0) {
if (Swing==2) {
Swing=Swing_n;BH = iHigh(NULL, TF,shift);BL = iLow(NULL, TF,shift);
}
uzl=uzl+1;
//low point
if (Swing==1) {
Uzel[uzl][1]=zd;
Uzel[uzl][2]=BL;
ExtMapBuffer2[shift]=BL;
Print("ExtMapBuffer2[shift] ", ExtMapBuffer2[shift];

ExtMapBuffer5[shift+3]=BL;

}
//high point
if (Swing==-1) {
Uzel[uzl][1]=zu;
Uzel[uzl][2]=BH;
ExtMapBuffer3[shift]=BH;
ExtMapBuffer4[shift+1]=BH+shf;
Print("ExtMapBuffer3[shift] ", ExtMapBuffer3[shift];

}
BH = iHigh(NULL, TF,shift);
BL = iLow(NULL, TF,shift);
}

if (Swing==1) {
if (iHigh(NULL,TF,shift)>=BH) {BH=iHigh(NULL,TF,shift);zu=shift;}}
if (swing==-1) {
if (iLow(NULL, TF,shift)<=BL) {BL=iLow(NULL, TF,shift); zd=shift;}}
Swing_n=Swing;
}


for (i=1;i<=uzl;i++) {
mv=StrToInteger(DoubleToStr(Uzel[i][1],0));
ExtMapBuffer1[mv]=Uzel[i][2];
// Print("parametre MV ", ExtMapBuffer1[mv];
}





return(0);
}
//+------------------------------------------------------------------+

 

I am asking for help in writing an indicator.

I need to write an indicator or script (what will work and how is better) which would show the possible reversal of the price based on history.

ToR is in the attached file.

I thank you in advance.

Sincerely Kirill.

If you have any questions, please write to onepips@bk.ru

Reason: