1시간 차트에서 오전 9시에 내부 막대가 있는 경우 BUY-STOP 또는 LIMIT 및 SELL-Stop otr LIMIT를 오전 10시 막대의 고점 및 저점에 배치합니다. 가격이 오전 10시 바보다 높거나 낮은 경우 오전 11시 바에서 롱 또는 숏이 발동됩니다.
Doji 바의 경우:
이전 막대의 HIGH에 BUY-STOP/BUY-LIMIT를 놓습니다.
이전 막대의 LOW에 SELL-STOP/SELL-LIMIT를 배치합니다.
설명:
Doji Bar는 0(영)입니다.
도지 바 앞의 바 또는 바는 매수 및 매도 한도를 설정하거나 고가와 저가에서 멈출 곳입니다.
도지 바 뒤의 바는 롱 또는 숏이 트리거되는 곳입니다.
1시간 차트에서 오전 9시에 doji bar가 있는 경우 BUY-STOP 또는 LIMIT 및 SELL-Stop otr LIMIT를 오전 8시 막대의 최고점과 최저점에 배치합니다. 가격이 오전 8시 막대보다 높거나 낮은 경우 오전 10시 막대에서 장단기 또는 공매도가 트리거됩니다.
mmmm 이에 대해 자세히 설명해주세요
또한 부울과 if()를 시도했지만 처음에는 작동하지 않았습니다.
안보면 더 설명이 안되는데...
기본을 지켜야 하지만...
이중 a=iCustom(인도A);
이중 b=iCustum(indiB);
이중 c=iCustom(indiC);
정수 주문 = 0;
if( a==1 && b>0 && c!=0 ) ORDer=1;
if( a==-1 && b<0 && c!=0 ) ORDer=-1;
if(주문==1) 구매();
if(주문==-1) 판매();
mmmm 이에 대해 자세히 설명해주세요. 부울과 if()를 시도했지만 처음에는 작동하지 않았습니다.
오케이 오케이 오케이!
여기 더 있습니다!
double
BuyValueCurrent,
SellValuePrevious,
SellValueCurrent,
BuyValuePrevious2,
BuyValueCurrent2,
SellValuePrevious2,
SellValueCurrent2,
BuyValueCurrent1min,
BuyValueCurrent5min,
BuyValueCurrent21min,
BuyValueCurrent25min,
SellValueCurrent1min,
SellValueCurrent5min,
SellValueCurrent21min,
SellValueCurrent25min,
TrendEnvUp,
TrendEnvDown,
TrendEnvUp1min,
TrendEnvUp5min,
TrendEnvDown1min,
TrendEnvDown5min,
Compra,
Vendi,
StopLong,
StopSell;
[/php]
the icustom funcions and buy sell
BuyValuePrevious = iCustom(NULL,TimeFrame,IndicatorName1,NumBars,0,2);
BuyValueCurrent = iCustom(NULL,0,IndicatorName1,NumBars,1,0);
BuyValuePrevious2 = iCustom(NULL,TimeFrame,IndicatorName2,NumBars,0,2);
BuyValueCurrent2 = iCustom(NULL,0,IndicatorName2,NumBars,0,0);
SellValuePrevious = iCustom(NULL,TimeFrame,IndicatorName1,NumBars,1,2);
SellValueCurrent = iCustom(NULL,0,IndicatorName1,NumBars,0,0);
SellValuePrevious2 = iCustom(NULL,TimeFrame,IndicatorName1,NumBars,1,2);
SellValueCurrent2 = iCustom(NULL,0,IndicatorName2,NumBars,1,0);
BuyValueCurrent1min = iCustom(NULL,1,IndicatorName1,NumBars,1,0);
BuyValueCurrent5min = iCustom(NULL,5,IndicatorName1,NumBars,1,0);
BuyValueCurrent21min = iCustom(NULL,1,IndicatorName2,NumBars,0,0);
BuyValueCurrent25min = iCustom(NULL,5,IndicatorName2,NumBars,0,0);
SellValueCurrent1min = iCustom(NULL,1,IndicatorName1,NumBars,0,0);
SellValueCurrent5min = iCustom(NULL,5,IndicatorName1,NumBars,0,0);
SellValueCurrent21min = iCustom(NULL,1,IndicatorName2,NumBars,1,0);
SellValueCurrent25min = iCustom(NULL,5,IndicatorName2,NumBars,1,0);
TrendEnvUp = iCustom(NULL,0,IndicatorName4,Ma_Period,Ma_Shift,Ma_Method,Applied_Price,Deviation,0,0); // trendenvelopes
TrendEnvDown = iCustom(NULL,0,IndicatorName4,Ma_Period,Ma_Shift,Ma_Method,Applied_Price,Deviation,1,0); // trendenvelopes
TrendEnvUp1min = iCustom(NULL,1,IndicatorName4,Ma_Period,Ma_Shift,Ma_Method,Applied_Price,Deviation,0,0);
TrendEnvUp5min = iCustom(NULL,5,IndicatorName4,Ma_Period,Ma_Shift,Ma_Method,Applied_Price,Deviation,0,0);
TrendEnvDown1min = iCustom(NULL,1,IndicatorName4,Ma_Period,Ma_Shift,Ma_Method,Applied_Price,Deviation,1,0);
TrendEnvDown5min = iCustom(NULL,5,IndicatorName4,Ma_Period,Ma_Shift,Ma_Method,Applied_Price,Deviation,1,0);
BuyCondition = (BuyValueCurrent !=0 && BuyValueCurrent2 !=0 && TrendEnvUp != EMPTY_VALUE)&& (BuyValueCurrent1min !=0 && BuyValueCurrent21min !=0 && TrendEnvUp1min != EMPTY_VALUE) && (BuyValueCurrent5min !=0 && BuyValueCurrent25min !=0 && TrendEnvUp5min != EMPTY_VALUE) ;
SellCondition = (SellValueCurrent !=0 && SellValueCurrent2 !=0 && TrendEnvDown != EMPTY_VALUE)&& (SellValueCurrent1min != 0 && SellValueCurrent21min != 0 && TrendEnvDown1min != EMPTY_VALUE)&& (SellValueCurrent5min != 0 && SellValueCurrent25min != 0 && TrendEnvDown5min != EMPTY_VALUE) ;
StopLong = ((SellValueCurrent !=0 && SellValueCurrent2 !=0) || (TrendEnvDown != EMPTY_VALUE));
StopSell = ((BuyValueCurrent !=0 && BuyValueCurrent2 !=0) || (TrendEnvUp != EMPTY_VALUE));
the exit condition
[php]
StopBuy = (SellValueCurrent !=0 && SellValueCurrent2 !=0 || TrendEnvDown != EMPTY_VALUE);
StopSell = (BuyValueCurrent !=0 && BuyValueCurrent2 !=0 || TrendEnvUp != EMPTY_VALUE);
이것들을 바꾸다...
따라서 모든 조건은 거짓이고 if() 조건이 참이 될 때까지 거짓을 유지합니다.
"더블"에서 StopLong 및 StopSell을 제거하면 다른 모든 "더블"은 유지될 수 있습니다.
이것은 당신을 위해 그것을 할 것입니다!
부울 BuyCondition=거짓;
부울 SellCondition=거짓;
부울 StopLong=거짓;
부울 StopSell=거짓;
if((BuyValueCurrent !=0 && BuyValueCurrent2 !=0 && TrendEnvUp != EMPTY_VALUE ) && (BuyValueCurrent1min !=0 && BuyValueCurrent21min !=0 && TrendEnvUpmin != EMPTY_VALUE && TrendEnvUp1min != EMPTY_VALUE) &&(최소 BuyValue!=EMPTY_VALUE) EMPTY_VALUE)) {구매조건=true;}
if((SellValueCurrent !=0 && SellValueCurrent2 !=0 && TrendEnvDown != EMPTY_VALUE) && (SellValueCurrent1min != 0 && SellValueCurrent21min != 0 && TrendEnvDown1min != SellValue&& TrendEnvDown1min != EMPTY_VALUE) &&(5minSellValueC EMPTY_VALUE)) {SellCondition=true;}
if((SellValueCurrent !=0 && SellValueCurrent2 !=0) || (TrendEnvDown != EMPTY_VALUE)) {StopLong=true;}
if((BuyValueCurrent !=0 && BuyValueCurrent2 !=0) || (TrendEnvUp != EMPTY_VALUE)) {StopSell=true;}
오케이 오케이 오케이!
여기 더 있습니다!
double
BuyValueCurrent,
SellValuePrevious,
SellValueCurrent,
BuyValuePrevious2,
BuyValueCurrent2,
SellValuePrevious2,
SellValueCurrent2,
BuyValueCurrent1min,
BuyValueCurrent5min,
BuyValueCurrent21min,
BuyValueCurrent25min,
SellValueCurrent1min,
SellValueCurrent5min,
SellValueCurrent21min,
SellValueCurrent25min,
TrendEnvUp,
TrendEnvDown,
TrendEnvUp1min,
TrendEnvUp5min,
TrendEnvDown1min,
TrendEnvDown5min,
Compra,
Vendi,
StopLong,
StopSell;
[/php]the icustom funcions and buy sell
BuyValuePrevious = iCustom(NULL,TimeFrame,IndicatorName1,NumBars,0,2);
BuyValueCurrent = iCustom(NULL,0,IndicatorName1,NumBars,1,0);
BuyValuePrevious2 = iCustom(NULL,TimeFrame,IndicatorName2,NumBars,0,2);
BuyValueCurrent2 = iCustom(NULL,0,IndicatorName2,NumBars,0,0);
SellValuePrevious = iCustom(NULL,TimeFrame,IndicatorName1,NumBars,1,2);
SellValueCurrent = iCustom(NULL,0,IndicatorName1,NumBars,0,0);
SellValuePrevious2 = iCustom(NULL,TimeFrame,IndicatorName1,NumBars,1,2);
SellValueCurrent2 = iCustom(NULL,0,IndicatorName2,NumBars,1,0);
BuyValueCurrent1min = iCustom(NULL,1,IndicatorName1,NumBars,1,0);
BuyValueCurrent5min = iCustom(NULL,5,IndicatorName1,NumBars,1,0);
BuyValueCurrent21min = iCustom(NULL,1,IndicatorName2,NumBars,0,0);
BuyValueCurrent25min = iCustom(NULL,5,IndicatorName2,NumBars,0,0);
SellValueCurrent1min = iCustom(NULL,1,IndicatorName1,NumBars,0,0);
SellValueCurrent5min = iCustom(NULL,5,IndicatorName1,NumBars,0,0);
SellValueCurrent21min = iCustom(NULL,1,IndicatorName2,NumBars,1,0);
SellValueCurrent25min = iCustom(NULL,5,IndicatorName2,NumBars,1,0);
TrendEnvUp = iCustom(NULL,0,IndicatorName4,Ma_Period,Ma_Shift,Ma_Method,Applied_Price,Deviation,0,0); // trendenvelopes
TrendEnvDown = iCustom(NULL,0,IndicatorName4,Ma_Period,Ma_Shift,Ma_Method,Applied_Price,Deviation,1,0); // trendenvelopes
TrendEnvUp1min = iCustom(NULL,1,IndicatorName4,Ma_Period,Ma_Shift,Ma_Method,Applied_Price,Deviation,0,0);
TrendEnvUp5min = iCustom(NULL,5,IndicatorName4,Ma_Period,Ma_Shift,Ma_Method,Applied_Price,Deviation,0,0);
TrendEnvDown1min = iCustom(NULL,1,IndicatorName4,Ma_Period,Ma_Shift,Ma_Method,Applied_Price,Deviation,1,0);
TrendEnvDown5min = iCustom(NULL,5,IndicatorName4,Ma_Period,Ma_Shift,Ma_Method,Applied_Price,Deviation,1,0);
BuyCondition = (BuyValueCurrent !=0 && BuyValueCurrent2 !=0 && TrendEnvUp != EMPTY_VALUE)&& (BuyValueCurrent1min !=0 && BuyValueCurrent21min !=0 && TrendEnvUp1min != EMPTY_VALUE) && (BuyValueCurrent5min !=0 && BuyValueCurrent25min !=0 && TrendEnvUp5min != EMPTY_VALUE) ;
SellCondition = (SellValueCurrent !=0 && SellValueCurrent2 !=0 && TrendEnvDown != EMPTY_VALUE)&& (SellValueCurrent1min != 0 && SellValueCurrent21min != 0 && TrendEnvDown1min != EMPTY_VALUE)&& (SellValueCurrent5min != 0 && SellValueCurrent25min != 0 && TrendEnvDown5min != EMPTY_VALUE) ;
StopLong = ((SellValueCurrent !=0 && SellValueCurrent2 !=0) || (TrendEnvDown != EMPTY_VALUE));
StopSell = ((BuyValueCurrent !=0 && BuyValueCurrent2 !=0) || (TrendEnvUp != EMPTY_VALUE));
the exit condition
[php]
StopBuy = (SellValueCurrent !=0 && SellValueCurrent2 !=0 || TrendEnvDown != EMPTY_VALUE);
StopSell = (BuyValueCurrent !=0 && BuyValueCurrent2 !=0 || TrendEnvUp != EMPTY_VALUE);
감사합니다 오늘 저녁에 시도해보겠습니다!
한 가지 어리석은 질문은 {} 안에 있는 모든 것이 귀하의 의견입니까 아니면 제가 작성해야 합니까? 그리고 왜? 왜 {;}이고 {}가 아닙니다. ?
또한 여전히 이 진술을 사용할 수 있습니까?
if(SellCondition)
{
ticket = subOpenOrder(OP_SELL,NewStopLossSell,TakeProfit,TicketComment); // open SELL order
subCheckError(ticket,"SELL");
LastTrade = "SELL";
return(0);
[/php]
or i have to write:
[php]
if(SellCondition = true)
{
ticket = subOpenOrder(OP_SELL,NewStopLossSell,TakeProfit,TicketComment); // open SELL order
subCheckError(ticket,"SELL");
LastTrade = "SELL";
return(0);
간단한 EA를 코딩하는 데 도움이 필요합니다. 제발...
모두들 안녕,
과거에 저를 도와주신 모든 분들께 감사드립니다. 지금 새로운 요청이 있습니다.
누군가 이 ea를 코딩하는 데 도움을 줄 수 있습니까? 매개변수는 다음과 같습니다.
내 ea는 도지 바와 내부 바를 기반으로 합니다.
내부 막대의 경우:
BUY-STOP/BUY-LIMIT를 다음 막대의 HIGH에 놓습니다.
SELL-STOP/SELL-LIMIT를 다음 막대의 LOW에 놓습니다.
설명:
내부 막대는 막대 0(영)입니다.
다음 바는 매수 및 매도 한도 또는 정지를 설정하는 곳입니다.
다음 바는 롱 또는 숏이 트리거되는 곳입니다.
1시간 차트에서 오전 9시에 내부 막대가 있는 경우 BUY-STOP 또는 LIMIT 및 SELL-Stop otr LIMIT를 오전 10시 막대의 고점 및 저점에 배치합니다. 가격이 오전 10시 바보다 높거나 낮은 경우 오전 11시 바에서 롱 또는 숏이 발동됩니다.
Doji 바의 경우:
이전 막대의 HIGH에 BUY-STOP/BUY-LIMIT를 놓습니다.
이전 막대의 LOW에 SELL-STOP/SELL-LIMIT를 배치합니다.
설명:
Doji Bar는 0(영)입니다.
도지 바 앞의 바 또는 바는 매수 및 매도 한도를 설정하거나 고가와 저가에서 멈출 곳입니다.
도지 바 뒤의 바는 롱 또는 숏이 트리거되는 곳입니다.
1시간 차트에서 오전 9시에 doji bar가 있는 경우 BUY-STOP 또는 LIMIT 및 SELL-Stop otr LIMIT를 오전 8시 막대의 최고점과 최저점에 배치합니다. 가격이 오전 8시 막대보다 높거나 낮은 경우 오전 10시 막대에서 장단기 또는 공매도가 트리거됩니다.
...그렇게 간단하지 않을 수도 있습니다. 그랬다면 2주 전에 했을 텐데.
미리 감사드립니다!
친애하는,
외환
이것은 주석이 아니라 코드입니다.
그것들은 if() 문의 일부입니다.
if(판매 조건){
...
리턴(0);
}
if(판매조건==true){
...
리턴(0);
}
두 진술 모두 괜찮습니다. 둘 중 하나를 사용할 수 있습니다 ...
그러나 모든 if() 문은 }로 닫힙니다.
여기에 제공한 코드에는 표시되지 않습니다.
다른 예:
if(a==b){c=1; d=2; 반환(0);}
한 가지 어리석은 질문은 {} 안에 있는 모든 것이 귀하의 의견입니까 아니면 제가 작성해야 합니까? 그리고 왜? 왜 {;}이고 {}가 아닙니다. ?
또한 여전히 이 진술을 사용할 수 있습니까?
if(SellCondition)
{
ticket = subOpenOrder(OP_SELL,NewStopLossSell,TakeProfit,TicketComment); // open SELL order
subCheckError(ticket,"SELL");
LastTrade = "SELL";
return(0);
[/php]
or i have to write:
[php]
if(SellCondition = true)
{
ticket = subOpenOrder(OP_SELL,NewStopLossSell,TakeProfit,TicketComment); // open SELL order
subCheckError(ticket,"SELL");
LastTrade = "SELL";
return(0);
아아아아아아아아ㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏ악
나는 대학에서 내 C를 검토하고 있습니다.
어쨌든 많은 thxs!!!
시작하는 몇 가지 지표를 찾았습니다 ...
EA도 있지만 성능이 그렇게 좋지는 않은 것 같아서 간단히 테스트를 해보았습니다...