Está perdiendo oportunidades comerciales:
- Aplicaciones de trading gratuitas
- 8 000+ señales para copiar
- Noticias económicas para analizar los mercados financieros
Registro
Entrada
Usted acepta la política del sitio web y las condiciones de uso
Si no tiene cuenta de usuario, regístrese
mladen... ¿puedes corregir el error?
//+------------------------------------------------------------------+
//| MTF_RSI.mq4 |
//| Copyright © 2006, Keris2112 |
//| |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, Keris2112"
#property link "https://www.forex-tsd.com"
//----
#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 Red
#property indicator_color2 DodgerBlue
#property indicator_color3 White
#property indicator_level1 30
#property indicator_level2 70
#property indicator_minimum 0
#property indicator_maximum 100
//----
extern int TimeFrame=5;
extern int RSIperiod=33;
extern int applied_price=0;
extern int TimeFrame1=15;
extern int RSIperiod1=21;
extern int applied_price1=0;
extern int TimeFrame2=15;
extern int RSIperiod2=14;
extern int applied_price2=0;
//----
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicator line
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexStyle(2,DRAW_LINE);
//---- name for DataWindow and indicator subwindow label
switch(TimeFrame)
{
case 1 : string TimeFrameStr="Period_M1"; break;
case 5 : TimeFrameStr="Period_M5"; break;
case 15 : TimeFrameStr="Period_M15"; break;
case 30 : TimeFrameStr="Period_M30"; break;
case 60 : TimeFrameStr="Period_H1"; break;
case 240 : TimeFrameStr="Period_H4"; break;
case 1440 : TimeFrameStr="Period_D1"; break;
case 10080 : TimeFrameStr="Period_W1"; break;
case 43200 : TimeFrameStr="Period_MN1"; break;
default : TimeFrameStr="Current Timeframe";
}
IndicatorShortName("MTF_RSI("+RSIperiod+") ("+TimeFrameStr+")");
}
//----
return(0);
//+------------------------------------------------------------------+
//| MTF RSI |
//+------------------------------------------------------------------+
int start()
{
datetime TimeArray[];
int i,limit,y=0,counted_bars=IndicatorCounted();
// Plot defined time frame on to current time frame
ArrayCopySeries(TimeArray,MODE_TIME,Symbol(),TimeFrame);
limit=Bars-counted_bars;
for(i=0,y=0;i<limit;i++)
{
if (Time<TimeArray[y]) y++;
//----
ExtMapBuffer1=iRSI(NULL,TimeFrame,RSIperiod,applied_price,y);
}
datetime TimeArray1[];
int ii,limiti,yi=0,counted_bars1=IndicatorCounted();
// Plot defined time frame on to current time frame
ArrayCopySeries(TimeArray1,MODE_TIME,Symbol(),TimeFrame1);
limiti=Bars-counted_bars1;
for(ii=0,yi=0;ii<limiti;ii++)
{
if (Time<TimeArray1[yi]) yi++;
//----
ExtMapBuffer2=iRSI(NULL,TimeFrame1,RSIperiod1,applied_price1,yi);
}
datetime TimeArray2[];
int iii,limitii,yii=0,counted_bars2=IndicatorCounted();
// Plot defined time frame on to current time frame
ArrayCopySeries(TimeArray2,MODE_TIME,Symbol(),TimeFrame2);
limitii=Bars-counted_bars2;
for(iii=0,yii=0;iii<limitii;iii++)
{
if (Time<TimeArray2[yii]) yii++;
//----
ExtMapBuffer3=iRSI(NULL,TimeFrame2,RSIperiod2,applied_price2,yii);
}
//----
return(0);
}
//+------------------------------------------------------------------+
Prueba el adjunto
Hola Mladen,
por favor, ¿puedes añadir "velo6" al indicador adjunto?
Necesito entrada para el color y "verdadero-falso"....ver imagen por ejemplo.
SIEMPRE GRACIAS......
1) durante la tendencia, las bandas de bollinger se ensanchan.....entonces la tendencia se detiene y hay un rango de treding.During rango de comercio bandas de bollinger contrato y en esta situación es muy bueno para usar stoc oversold-sobrecompra.
esta es mi formula de metastoch...
ANCHO:=
((Mov(C,71,S)+(2*(Std(C,71))))-
(Mov(C,71,S)-(2*(Std(C,71)))));
MEDIA:=Mov(ANCHURA,15,S);
ST:=Stoch(5,3);
TIME:=BarsSince(WIDTH=0 AND
BarsSince(WIDTH<MEDIA)<=5;
CONDBUY:=ST<=30 O (Ref(ST<=30,-1) Y H<=Ref(H,-1));
TIEMPO Y CONDBUY
EXPLICACIÓN:
1) utilizo la banda de bollinger 71 y la desviación 2
2) sobre la anchura de la banda de bollinger aplico una media móvil simple de 15
3) cuando el ancho de la banda de bollinger está por debajo de la media móvil simple y también durante 5 barras después de eso, significa que el mercado ha comenzado a operar en un rango ....
4) cuando hay un rango de negociación veo el estocástico por debajo de 30
Hola Mladen
Por favor, ¿puede añadir "velo6" al indicador adjunto?
Necesito entrada para el color y "verdadero-falso"....ver imagen por ejemplo.
SIEMPRE GRACIAS......carbonmimetic
Aquí tienes
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡...como he dicho antes...SIEMPRE GRACIAS!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Hola Mladen
Para molestarte por favor pon el código en los indicadores de MT4 okay?.
Estoy ansioso por probar.
Gracias
Kreangast
2013/5/25
Hola Mladen
Para molestar a usted por favor poner el código en los indicadores de MT4 okay?.
Estoy ansioso por probar.
Gracias
Kreangast
2013/5/25Lo siento
Como no uso Amibroker no puedo convertir ese código a metatrader 4 y estar 100% seguro de que es correcto (y odiaría ser responsable de algún indicador mal codificado)
Lo siento Como no uso Amibroker no puedo convertir ese código a metatrader 4 y estar 100% seguro de que es correcto (y no me gustaría ser responsable de algún indicador mal codificado)
Hola Mladen
Lo siento. AMI Desde el problema se ha resuelto.
Gracias por ayudar a reemplazar MT4.
"-BarsSince(X)=BarsLate(X)"
_SECTION_BEGIN("pfoot");
TimeFrameSet(inDaily);
TR=Max(Max((High-Low),abs(Ref(Close,-1)-High)),abs(Ref(Close,-1)-Low));
A= H-(TR*0,3);
A1=H-(TR*0,6);
A2=H-(TR*0,8);
A3=H-(TR*1,0);
//
B= L+(TR*0,3);
B1=L+(TR*0,6);
B2=L+(TR*0,8);
B3=L+(TR*1,0);
//
N=100;
H2=H==HHV(H,N);//
L2=L==LLV(L,N);//
PPF=Ref(A,-BarsSince(H2));//BarsSince=BarsLate
PPF1=Ref(A1,-BarsSine(H2));//
PPF2=Ref(A2,-Seno de la barra(H2));//
PPF3=Ref(A3,-Seno de la barra(H2));//
//
PPFF=Ref(B,-BarsSince(L2));//
PPFF1=Ref(B1,-BarSince(L2));//
PPFF2=Ref(B2,-BarsSince(L2));//
PPFF3=Ref(B3,-BarsSince(L2));//
TimeFrameRestore();
// Trazar las nubes y líneas de los niveles de soporte //
Plot(TimeFrameExpand(PPF,inDaily ,expandLast), "R1", colorGreen, styleThick);
Plot(TimeFrameExpand(PPF1,inDaily ,expandLast), "R2", colorGreen,styleThick);
Plot(TimeFrameExpand(PPF2,inDaily ,expandLast), "R3", colorGreen,styleThick);
Plot(TimeFrameExpand(PPF3,inDaily ,expandLast), "R4", colorGreen,styleThick);
Plot(TimeFrameExpand(PPFF,inDaily ,expandLast), "S1", colorAzul, styleThick);
Plot(TimeFrameExpand(PPFF1,inDaily ,expandLast), "S2", colorAzul,styleThick);
Plot(TimeFrameExpand(PPFF2,inDaily ,expandLast), "S3", colorBlue,styleThick);
Plot(TimeFrameExpand(PPFF3,inDaily ,expandLast), "S4", colorBlue,styleThick);
_SECTION_END();
Gracias
Kreangast
Formulo mi pregunta aquí.
¿Cuál es el método para reducir el número de barras que muestra un indicador en el gráfico?
Sin tener que reducir el número de barras que se muestran en el gráfico de Metatrader.
¿Hay algunas líneas de código que se puede aplicar a un gran número de indicadores?
Gracias por su atención.
Formulo mi pregunta aquí.
¿Cuál es el método para reducir el número de barras que muestra un indicador en el gráfico?
Sin tener que reducir el número de barras que se muestran en el gráfico de Metatrader.
¿Hay alguna línea de código que se pueda aplicar a un gran número de indicadores?
Gracias por su atención.Antonsan
Por favor, lea este post : https://www.mql5.com/en/forum/180284/page31. Va a repetir la esencia - usted debe cambiar el límite de barras en el código. No hay otra manera.