묻다! - 페이지 151 1...144145146147148149150151152153154155156157158...182 새 코멘트 [삭제] 2009.07.01 09:01 #1501 MetaTrader 및 주문서 좋아, 나는 "Ask"와 "Bid" 사전 정의 변수가 실제로 가장 좋은 주문을 저장한다고 말해야 한다... 그러나 주문 책의 다른 수준과 많은 부분은 어떻습니까? 어쨌든 내 코드에서 이러한 데이터를 사용할 수 있습니까? 도와주세요. 웹에서 여기저기 많이 검색했지만 답을 찾지 못했습니다. 프로타 Ricx 2009.07.02 05:45 #1502 빠른 질문 하나... 야 내가 굵게 처리하면 밑줄 친 부분을 할 필요가 없겠죠? if(Ask>=Line1) { posisi=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slipage,0,0,"OneLineEA 버전 1.0",Megic,0,Green); if(OrderSelect(포지시,SELECT_BY_TICKET)==true) { posisi=OrderTicket(); } } daylight 2009.07.09 16:44 #1503 도와주세요 HI 코더스구루 당신을 위해 많은 감사합니다 이 진술과 의미를 설명해 주시겠습니까? for(int shift = Bars-10, shift >= 0, shift--) { ExtMapBuffer1[시프트] = ma[시프트]; ExtMapBuffer2[시프트] = ma[시프트]; //인쇄(ma[시프트]); if (ma[shift] > ma[shift+1]) { ExtMapBuffer1[시프트] = EMPTY_VALUE; ExtMapBuffer2[시프트+1] = ma[시프트+1]; } 그렇지 않으면 (ma[shift] < ma[shift+1]) { ExtMapBuffer2[시프트] = EMPTY_VALUE; ExtMapBuffer1[시프트+1] = ma[시프트+1]; } 이 EA에서 //---- 표시기 설정 #속성 표시기_차트_창 #속성 표시기_버퍼 2 #property indicator_color1 라임 #property indicator_color2 빨간색 //---- 버퍼 이중 ExtMapBuffer1[]; 이중 ExtMapBuffer2[],ma[]; 외부 정수 MAType = 1; extern int MAPeriod = 34; 외부 정수 MAShift = 0; 외부 정수 PriceType=0; //+----------------------------------------------- -------------------+ //| 커스텀 인디케이터 초기화 기능 | //+----------------------------------------------- -------------------+ 정수 초기화() { //---- 2개의 추가 버퍼가 계산에 사용됩니다. 표시 버퍼(5); //---- 그리기 설정 SetIndexBuffer(0,ExtMapBuffer1); SetIndexBuffer(1,ExtMapBuffer2); SetIndexBuffer(2,ma); SetIndexStyle(0,DRAW_LINE,0,2); SetIndexStyle(1,DRAW_LINE,0,2); //---- 초기화 완료 리턴(0); } 정수 시작() { for(int i = Bars-10, i >= 0, i--) { ma=iMA(NULL,0,MAPeriod,MAShift,MAType,PriceType,i); } for(int shift = Bars-10, shift >= 0, shift--) { ExtMapBuffer1[시프트] = ma[시프트]; ExtMapBuffer2[시프트] = ma[시프트]; //인쇄(ma[시프트]); if (ma[shift] > ma[shift+1]) { ExtMapBuffer1[시프트] = EMPTY_VALUE; ExtMapBuffer2[시프트+1] = ma[시프트+1]; } 그렇지 않으면 (ma[shift] < ma[shift+1]) { ExtMapBuffer2[시프트] = EMPTY_VALUE; ExtMapBuffer1[시프트+1] = ma[시프트+1]; } } 리턴(0); } //+----------------------------------------------- -------------------+ 감사합니다 Ask! Original lessons Error - Unexpected token Roger09 2009.07.09 22:32 #1504 EA가 아니라 " 이동 평균" 지표가 오르내리는 순간을 알려주는 지표입니다. 필요한 코드는 마지막 10개의 막대만 계산합니다. /indicators 디렉토리에 넣고 터미널을 다시 시작하십시오. daylight 2009.07.10 06:59 #1505 다른 모두들 안녕 나를 도울 수 있나요 EMA5c와 EMA5p의 차이점 무슨 뜻입니까 (EMA5c>EMA10c && EMA5pEMA10c)) 이중 EMA5c = iMA(NULL,TimeFrame,5,0,MODE_EMA,PRICE_CLOSE, 0 ); 이중 EMA10c = iMA(NULL,TimeFrame,10,0,MODE_EMA,PRICE_CLOSE,0); 이중 EMA5p = iMA(NULL,TimeFrame,5,0,MODE_EMA,PRICE_CLOSE, 1 ); 이중 EMA10p = iMA(NULL,TimeFrame,10,0,MODE_EMA,PRICE_CLOSE,1); luxinterior 2009.07.10 08:47 #1506 이름은 변수 이름일 뿐 실제로 의미가 없습니다. 프로그래머는 일반적으로 변수 이름을 선택하여 어떤 종류의 값을 보유해야 하는지 자명합니다. 이 두 가지를 보면 프로그래머가 현재 막대 변수에 접미사 c를 추가하고 이전 막대 변수에 p를 추가하기로 선택한 것 같습니다. 럭스 paytongannaway 2009.07.10 15:27 #1507 안녕하세요, 질문이 있습니다. 친구가 제가 몇 주 동안 데모를 해왔고 그것을 좋아한다는 표시를 받았습니다. 간단히 설명하면 차트에 화살표가 나타나 움직임을 재생하는 방법을 알려줍니다. 30m 차트에서 사용하므로 너무 자주 나오지 않습니다. 화살표가 롱 포지션에 대해 표시될 때 내 숏 포지션을 청산하고 롱 포지션으로 가거나, 숏 포지션이 없으면 그냥 롱 포지션으로 가는 방법이 있습니까? 또한 짧은 신호로 그 반대의 경우도 마찬가지입니까? paytongannaway 2009.07.10 16:06 #1508 편집 버튼이 보이지 않아 여기에 코드가 있습니다. 구매 또는 판매 코드를 추가하는 것만으로도 너무 어려울 것 같지는 않습니다. 이것은 지그재그 코드에서 가져온 것입니다. 무료 인도 #property indicator_chart_window #property indicator_buffers 1 #property indicator_color1 Red //---- indicator parameters extern int ExtDepth=12; extern int ExtDeviation=5; extern int ExtBackstep=3; //---- indicator buffers double ZigzagBuffer[]; double HighMapBuffer[]; double LowMapBuffer[]; int level=3; // recounting's depth bool downloadhistory=false; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { IndicatorBuffers(3); //---- drawing settings SetIndexStyle(0,DRAW_SECTION); //---- indicator buffers mapping SetIndexBuffer(0,ZigzagBuffer); SetIndexBuffer(1,HighMapBuffer); SetIndexBuffer(2,LowMapBuffer); SetIndexEmptyValue(0,0.0); //---- indicator short name IndicatorShortName("ZigZag("+ExtDepth+","+ExtDeviation+","+ExtBackstep+")"); //---- initialization done return(0); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int start() { int i, counted_bars = IndicatorCounted(); int limit,counterZ,whatlookfor; int shift,back,lasthighpos,lastlowpos; double val,res; double curlow,curhigh,lasthigh,lastlow; if (counted_bars==0 && downloadhistory) // history was downloaded { ArrayInitialize(ZigzagBuffer,0.0); ArrayInitialize(HighMapBuffer,0.0); ArrayInitialize(LowMapBuffer,0.0); } if (counted_bars==0) { limit=Bars-ExtDepth; downloadhistory=true; } if (counted_bars>0) { while (counterZ<level && i<100) { res=ZigzagBuffer; if (res!=0) counterZ++; i++; } i--; limit=i; if (LowMapBuffer!=0) { curlow=LowMapBuffer; whatlookfor=1; } else { curhigh=HighMapBuffer; whatlookfor=-1; } for (i=limit-1;i>=0;i--) { ZigzagBuffer=0.0; LowMapBuffer=0.0; HighMapBuffer=0.0; } } for(shift=limit; shift>=0; shift--) { val=Low; if(val==lastlow) val=0.0; else { lastlow=val; if((Low[shift]-val)>(ExtDeviation*Point)) val=0.0; else { for(back=1; back<=ExtBackstep; back++) { res=LowMapBuffer[shift+back]; if((res!=0)&&(res>val)) LowMapBuffer[shift+back]=0.0; } } } if (Low[shift]==val) LowMapBuffer[shift]=val; else LowMapBuffer[shift]=0.0; //--- high val=High; if(val==lasthigh) val=0.0; else { lasthigh=val; if((val-High[shift])>(ExtDeviation*Point)) val=0.0; else { for(back=1; back<=ExtBackstep; back++) { res=HighMapBuffer[shift+back]; if((res!=0)&&(res<val)) HighMapBuffer[shift+back]=0.0; } } } if (High[shift]==val) HighMapBuffer[shift]=val; else HighMapBuffer[shift]=0.0; } // final cutting if (whatlookfor==0) { lastlow=0; lasthigh=0; } else { lastlow=curlow; lasthigh=curhigh; } for (shift=limit;shift>=0;shift--) { res=0.0; switch(whatlookfor) { case 0: // look for peak or lawn if (lastlow==0 && lasthigh==0) { if (HighMapBuffer[shift]!=0) { lasthigh=High[shift]; lasthighpos=shift; whatlookfor=-1; ZigzagBuffer[shift]=lasthigh; res=1; } if (LowMapBuffer[shift]!=0) { lastlow=Low[shift]; lastlowpos=shift; whatlookfor=1; ZigzagBuffer[shift]=lastlow; res=1; } } break; case 1: // look for peak if (LowMapBuffer[shift]!=0.0 && LowMapBuffer[shift]<lastlow && HighMapBuffer[shift]==0.0) { ZigzagBuffer[lastlowpos]=0.0; lastlowpos=shift; lastlow=LowMapBuffer[shift]; ZigzagBuffer[shift]=lastlow; res=1; } if (HighMapBuffer[shift]!=0.0 && LowMapBuffer[shift]==0.0) { lasthigh=HighMapBuffer[shift]; lasthighpos=shift; ZigzagBuffer[shift]=lasthigh; whatlookfor=-1; res=1; } break; case -1: // look for lawn if (HighMapBuffer[shift]!=0.0 && HighMapBuffer[shift]>lasthigh && LowMapBuffer[shift]==0.0) { ZigzagBuffer[lasthighpos]=0.0; lasthighpos=shift; lasthigh=HighMapBuffer[shift]; ZigzagBuffer[shift]=lasthigh; } if (LowMapBuffer[shift]!=0.0 && HighMapBuffer[shift]==0.0) { lastlow=LowMapBuffer[shift]; lastlowpos=shift; ZigzagBuffer[shift]=lastlow; whatlookfor=1; } break; default: return; } } return(0); } //+------------------------------------------------------------------+ Ask! Zigzag indicators 지그재그 표시기 basalo 2009.07.10 17:22 #1509 초보자 질문 안녕 모두 이전 양초에서 사용자 지정 지표 를 찾을 수 있습니까? 그렇다면 어떻게 해야 합니까? 기본적으로 표시기의 색상을 찾고 싶습니다. 미리 감사합니다 luxinterior 2009.07.10 20:02 #1510 basalo: 안녕 모두 이전 양초에서 사용자 지정 지표를 찾을 수 있습니까? 그렇다면 어떻게 해야 합니까? 기본적으로 표시기의 색상을 찾고 싶습니다. 미리 감사합니다 iCustom 함수 에서 메타에디터 도움말 파일을 보십시오. 럭스 1...144145146147148149150151152153154155156157158...182 새 코멘트 트레이딩 기회를 놓치고 있어요: 무료 트레이딩 앱 복사용 8,000 이상의 시그널 금융 시장 개척을 위한 경제 뉴스 등록 로그인 공백없는 라틴 문자 비밀번호가 이 이메일로 전송될 것입니다 오류 발생됨 Google으로 로그인 웹사이트 정책 및 이용약관에 동의합니다. 계정이 없으시면, 가입하십시오 MQL5.com 웹사이트에 로그인을 하기 위해 쿠키를 허용하십시오. 브라우저에서 필요한 설정을 활성화하시지 않으면, 로그인할 수 없습니다. 사용자명/비밀번호를 잊으셨습니까? Google으로 로그인
MetaTrader 및 주문서
좋아, 나는 "Ask"와 "Bid" 사전 정의 변수가 실제로 가장 좋은 주문을 저장한다고 말해야 한다... 그러나 주문 책의 다른 수준과 많은 부분은 어떻습니까? 어쨌든 내 코드에서 이러한 데이터를 사용할 수 있습니까?
도와주세요. 웹에서 여기저기 많이 검색했지만 답을 찾지 못했습니다.
프로타
빠른 질문 하나...
야 내가 굵게 처리하면 밑줄 친 부분을 할 필요가 없겠죠?
if(Ask>=Line1)
{
posisi=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slipage,0,0,"OneLineEA 버전 1.0",Megic,0,Green);
if(OrderSelect(포지시,SELECT_BY_TICKET)==true)
{
posisi=OrderTicket();
}
}
도와주세요
HI 코더스구루
당신을 위해 많은 감사합니다
이 진술과 의미를 설명해 주시겠습니까?
for(int shift = Bars-10, shift >= 0, shift--)
{
ExtMapBuffer1[시프트] = ma[시프트];
ExtMapBuffer2[시프트] = ma[시프트];
//인쇄(ma[시프트]);
if (ma[shift] > ma[shift+1])
{
ExtMapBuffer1[시프트] = EMPTY_VALUE;
ExtMapBuffer2[시프트+1] = ma[시프트+1];
}
그렇지 않으면 (ma[shift] < ma[shift+1])
{
ExtMapBuffer2[시프트] = EMPTY_VALUE;
ExtMapBuffer1[시프트+1] = ma[시프트+1];
}
이 EA에서
//---- 표시기 설정
#속성 표시기_차트_창
#속성 표시기_버퍼 2
#property indicator_color1 라임
#property indicator_color2 빨간색
//---- 버퍼
이중 ExtMapBuffer1[];
이중 ExtMapBuffer2[],ma[];
외부 정수 MAType = 1;
extern int MAPeriod = 34;
외부 정수 MAShift = 0;
외부 정수 PriceType=0;
//+----------------------------------------------- -------------------+
//| 커스텀 인디케이터 초기화 기능 |
//+----------------------------------------------- -------------------+
정수 초기화()
{
//---- 2개의 추가 버퍼가 계산에 사용됩니다.
표시 버퍼(5);
//---- 그리기 설정
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexBuffer(2,ma);
SetIndexStyle(0,DRAW_LINE,0,2);
SetIndexStyle(1,DRAW_LINE,0,2);
//---- 초기화 완료
리턴(0);
}
정수 시작()
{
for(int i = Bars-10, i >= 0, i--)
{
ma=iMA(NULL,0,MAPeriod,MAShift,MAType,PriceType,i);
}
for(int shift = Bars-10, shift >= 0, shift--)
{
ExtMapBuffer1[시프트] = ma[시프트];
ExtMapBuffer2[시프트] = ma[시프트];
//인쇄(ma[시프트]);
if (ma[shift] > ma[shift+1])
{
ExtMapBuffer1[시프트] = EMPTY_VALUE;
ExtMapBuffer2[시프트+1] = ma[시프트+1];
}
그렇지 않으면 (ma[shift] < ma[shift+1])
{
ExtMapBuffer2[시프트] = EMPTY_VALUE;
ExtMapBuffer1[시프트+1] = ma[시프트+1];
}
}
리턴(0);
}
//+----------------------------------------------- -------------------+
감사합니다
EA가 아니라 " 이동 평균" 지표가 오르내리는 순간을 알려주는 지표입니다.
필요한 코드는 마지막 10개의 막대만 계산합니다.
/indicators 디렉토리에 넣고 터미널을 다시 시작하십시오.
다른
모두들 안녕
나를 도울 수 있나요
EMA5c와 EMA5p의 차이점
무슨 뜻입니까 (EMA5c>EMA10c && EMA5pEMA10c))
이중 EMA5c = iMA(NULL,TimeFrame,5,0,MODE_EMA,PRICE_CLOSE, 0 );
이중 EMA10c = iMA(NULL,TimeFrame,10,0,MODE_EMA,PRICE_CLOSE,0);
이중 EMA5p = iMA(NULL,TimeFrame,5,0,MODE_EMA,PRICE_CLOSE, 1 );
이중 EMA10p = iMA(NULL,TimeFrame,10,0,MODE_EMA,PRICE_CLOSE,1);
이름은 변수 이름일 뿐 실제로 의미가 없습니다. 프로그래머는 일반적으로 변수 이름을 선택하여 어떤 종류의 값을 보유해야 하는지 자명합니다. 이 두 가지를 보면 프로그래머가 현재 막대 변수에 접미사 c를 추가하고 이전 막대 변수에 p를 추가하기로 선택한 것 같습니다.
럭스
안녕하세요, 질문이 있습니다. 친구가 제가 몇 주 동안 데모를 해왔고 그것을 좋아한다는 표시를 받았습니다. 간단히 설명하면 차트에 화살표가 나타나 움직임을 재생하는 방법을 알려줍니다. 30m 차트에서 사용하므로 너무 자주 나오지 않습니다. 화살표가 롱 포지션에 대해 표시될 때 내 숏 포지션을 청산하고 롱 포지션으로 가거나, 숏 포지션이 없으면 그냥 롱 포지션으로 가는 방법이 있습니까? 또한 짧은 신호로 그 반대의 경우도 마찬가지입니까?
편집 버튼이 보이지 않아 여기에 코드가 있습니다. 구매 또는 판매 코드를 추가하는 것만으로도 너무 어려울 것 같지는 않습니다. 이것은 지그재그 코드에서 가져온 것입니다. 무료 인도
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Red
//---- indicator parameters
extern int ExtDepth=12;
extern int ExtDeviation=5;
extern int ExtBackstep=3;
//---- indicator buffers
double ZigzagBuffer[];
double HighMapBuffer[];
double LowMapBuffer[];
int level=3; // recounting's depth
bool downloadhistory=false;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
IndicatorBuffers(3);
//---- drawing settings
SetIndexStyle(0,DRAW_SECTION);
//---- indicator buffers mapping
SetIndexBuffer(0,ZigzagBuffer);
SetIndexBuffer(1,HighMapBuffer);
SetIndexBuffer(2,LowMapBuffer);
SetIndexEmptyValue(0,0.0);
//---- indicator short name
IndicatorShortName("ZigZag("+ExtDepth+","+ExtDeviation+","+ExtBackstep+")");
//---- initialization done
return(0);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int start()
{
int i, counted_bars = IndicatorCounted();
int limit,counterZ,whatlookfor;
int shift,back,lasthighpos,lastlowpos;
double val,res;
double curlow,curhigh,lasthigh,lastlow;
if (counted_bars==0 && downloadhistory) // history was downloaded
{
ArrayInitialize(ZigzagBuffer,0.0);
ArrayInitialize(HighMapBuffer,0.0);
ArrayInitialize(LowMapBuffer,0.0);
}
if (counted_bars==0)
{
limit=Bars-ExtDepth;
downloadhistory=true;
}
if (counted_bars>0)
{
while (counterZ<level && i<100)
{
res=ZigzagBuffer;
if (res!=0) counterZ++;
i++;
}
i--;
limit=i;
if (LowMapBuffer!=0)
{
curlow=LowMapBuffer;
whatlookfor=1;
}
else
{
curhigh=HighMapBuffer;
whatlookfor=-1;
}
for (i=limit-1;i>=0;i--)
{
ZigzagBuffer=0.0;
LowMapBuffer=0.0;
HighMapBuffer=0.0;
}
}
for(shift=limit; shift>=0; shift--)
{
val=Low;
if(val==lastlow) val=0.0;
else
{
lastlow=val;
if((Low[shift]-val)>(ExtDeviation*Point)) val=0.0;
else
{
for(back=1; back<=ExtBackstep; back++)
{
res=LowMapBuffer[shift+back];
if((res!=0)&&(res>val)) LowMapBuffer[shift+back]=0.0;
}
}
}
if (Low[shift]==val) LowMapBuffer[shift]=val; else LowMapBuffer[shift]=0.0;
//--- high
val=High;
if(val==lasthigh) val=0.0;
else
{
lasthigh=val;
if((val-High[shift])>(ExtDeviation*Point)) val=0.0;
else
{
for(back=1; back<=ExtBackstep; back++)
{
res=HighMapBuffer[shift+back];
if((res!=0)&&(res<val)) HighMapBuffer[shift+back]=0.0;
}
}
}
if (High[shift]==val) HighMapBuffer[shift]=val; else HighMapBuffer[shift]=0.0;
}
// final cutting
if (whatlookfor==0)
{
lastlow=0;
lasthigh=0;
}
else
{
lastlow=curlow;
lasthigh=curhigh;
}
for (shift=limit;shift>=0;shift--)
{
res=0.0;
switch(whatlookfor)
{
case 0: // look for peak or lawn
if (lastlow==0 && lasthigh==0)
{
if (HighMapBuffer[shift]!=0)
{
lasthigh=High[shift];
lasthighpos=shift;
whatlookfor=-1;
ZigzagBuffer[shift]=lasthigh;
res=1;
}
if (LowMapBuffer[shift]!=0)
{
lastlow=Low[shift];
lastlowpos=shift;
whatlookfor=1;
ZigzagBuffer[shift]=lastlow;
res=1;
}
}
break;
case 1: // look for peak
if (LowMapBuffer[shift]!=0.0 && LowMapBuffer[shift]<lastlow && HighMapBuffer[shift]==0.0)
{
ZigzagBuffer[lastlowpos]=0.0;
lastlowpos=shift;
lastlow=LowMapBuffer[shift];
ZigzagBuffer[shift]=lastlow;
res=1;
}
if (HighMapBuffer[shift]!=0.0 && LowMapBuffer[shift]==0.0)
{
lasthigh=HighMapBuffer[shift];
lasthighpos=shift;
ZigzagBuffer[shift]=lasthigh;
whatlookfor=-1;
res=1;
}
break;
case -1: // look for lawn
if (HighMapBuffer[shift]!=0.0 && HighMapBuffer[shift]>lasthigh && LowMapBuffer[shift]==0.0)
{
ZigzagBuffer[lasthighpos]=0.0;
lasthighpos=shift;
lasthigh=HighMapBuffer[shift];
ZigzagBuffer[shift]=lasthigh;
}
if (LowMapBuffer[shift]!=0.0 && HighMapBuffer[shift]==0.0)
{
lastlow=LowMapBuffer[shift];
lastlowpos=shift;
ZigzagBuffer[shift]=lastlow;
whatlookfor=1;
}
break;
default: return;
}
}
return(0);
}
//+------------------------------------------------------------------+초보자 질문
안녕 모두
이전 양초에서 사용자 지정 지표 를 찾을 수 있습니까? 그렇다면 어떻게 해야 합니까?
기본적으로 표시기의 색상을 찾고 싶습니다.
미리 감사합니다
안녕 모두
이전 양초에서 사용자 지정 지표를 찾을 수 있습니까? 그렇다면 어떻게 해야 합니까?
기본적으로 표시기의 색상을 찾고 싶습니다.
미리 감사합니다iCustom 함수 에서 메타에디터 도움말 파일을 보십시오.
럭스