[ARCHIVE!] 포럼을 어지럽히 지 않도록 초보자 질문. 프로, 놓치지 마세요. 너 없이는 아무데도 - 4. - 페이지 141

 
first_may :
안녕하세요. MT4에는 볼륨 표시기가 있습니다. 틱 볼륨을 표시합니까?

티크
 
CLAIN :

가장 흥미로운 점은 보증금이 충분하다는 것입니다. 거기에 많은 준비금이 있습니다.
포지션을 연 직후 Print()에 오류를 표시하고 그 이유를 확인하십시오.
 

문제.

지표 를 작성했습니다. 사용되는 주요 기능은 어디에서나 주문 및 계정 iClose iOpen 비용 Symbol()입니다. 그러나 어떤 이유로 지표는 EURUSD에서만 작동합니다............. 다른 악기를 시도했습니다. 중단((( .

표시기의 본질: 계정에 대한 정보, 무료 마진, 개설할 로트 수, 오픈 레이트, 화폐에 대한 Profit\Risk 비율, (OrderSymbol()!=Symbol())이 계속되는 경우에만 설정됩니다.

이유를 10~20번 수정했습니다. 난 이해가 안 돼요...((((

미리 감사드립니다

 
sergeev :

티크

볼륨 그룹의 MT4에 있는 모든 표시기 가 틱 볼륨을 표시하는 것으로 나타났습니다.
 
paladin80 :
포지션을 연 직후 Print()에 오류를 표시하고 그 이유를 확인하십시오.


가장 흥미로운 점은 테스터에 문제가 없다는 것입니다. 2000년부터 현재까지 배수관 없이 운영되고 있다.

코드가 도움이 될까요?

 //+------------------------------------------------------------------+ 
//| StMartin.mq4 | 
//| Sergey Kodolov | 
//| 84232676421@mail.ru | 
//+------------------------------------------------------------------+ 
#property copyright "Sergey Kodolov" 
#property link "84232676421@mail.ru" 

     extern int TP = 1000 ; 
     extern int TS = 1000 ; 
     extern double lots = 1.0 ; 

     double volumz; 
     int ticket,total; 
     int slip = 3 ; 
     int Magic = 7 ; 

 


//+------------------------------------------------------------------+ 
//| expert initialization function | 
//+------------------------------------------------------------------+ 
int init() 
  { 
//---- 

        ticket = OrderSend ( Symbol (),OP_BUY,lots,Ask,slip,Bid-TS* Point ,Bid+TP* Point , "First order" ,Magic, 0 , Yellow ); //открываем первый ордер 
 
//---- 
   return ( 0 ); 
  } 
//+------------------------------------------------------------------+ 
//| expert deinitialization function | 
//+------------------------------------------------------------------+ 
int deinit() 
  { 
//---- 

//---- 
   return ( 0 ); 
  } 
//+------------------------------------------------------------------+ 
//| expert start function | 
//+------------------------------------------------------------------+ 
int start() 
  { 
//---- 

OrderOpenFunction(); 
StrahBuy();
StrahSell();

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

void OrderOpenFunction()
{
   OrderSelect (ticket,SELECT_BY_TICKET);
   if ( OrderCloseTime ()> 0 )
   {
      
      total = OrdersTotal ();
       Comment ( "OrderCloseTime = " , OrderCloseTime (), " ms" );
       if (total < 1 ) 
      { 
         OrderSelect (ticket,SELECT_BY_TICKET); 
         volumz = OrderLots (); 
         Print ( "Orderlots = " , OrderLots ());
         if ( OrderType () == OP_BUY)
         {
             if ( OrderClosePrice ()- OrderOpenPrice ()> 0 )
            {
               ticket = OrderSend ( Symbol (),OP_BUY,lots,Ask,slip,Bid-TS* Point ,Bid+TP* Point , 0 ,Magic, 0 , Green );
            }
             if ( OrderClosePrice ()- OrderOpenPrice ()< 0 )
            {
               double lot1 = volumz* 2 ; 
               ticket = OrderSend ( Symbol (),OP_SELL,lot1,Bid,slip,Ask+TS* Point ,Ask-TP* Point , 0 ,Magic, 0 , Red ); 
            }
         }
         if ( OrderType () == OP_SELL)
         {
             if ( OrderClosePrice ()- OrderOpenPrice ()< 0 )
            {
               ticket = OrderSend ( Symbol (),OP_SELL,lots,Bid,slip,Ask+TS* Point ,Ask-TP* Point , 0 ,Magic, 0 , Red );
            }
             if ( OrderClosePrice ()- OrderOpenPrice ()> 0 )
            {
               double lot2 = volumz* 2 ; 
               ticket = OrderSend ( Symbol (),OP_BUY,lot2,Ask,slip,Bid-TS* Point ,Bid+TP* Point , 0 ,Magic, 0 , Green );
            }
         }
      }
   }    
}      
  
void StrahBuy()
{
   total = OrdersTotal ();
   if (total< 1 )
   {
       OrderSelect ( 0 ,SELECT_BY_POS);
       if ( OrderType () == OP_BUY)
      {
         if ( OrderClosePrice ()- OrderOpenPrice ()> 0 )
         {
            ticket = OrderSend ( Symbol (),OP_BUY,lots,Ask,slip,Bid-TS* Point ,Bid+TP* Point , 0 ,Magic, 0 , Green );
         }
         if ( OrderClosePrice ()- OrderOpenPrice ()< 0 )
         {
             double lot1 = volumz* 2 ; 
            ticket = OrderSend ( Symbol (),OP_SELL,lot1,Bid,slip,Ask+TS* Point ,Ask-TP* Point , 0 ,Magic, 0 , Red ); 
         }
      }      
   }
}

void StrahSell()
{
   total = OrdersTotal ();
   if (total< 1 )
   {
       OrderSelect ( 0 ,SELECT_BY_POS);
       if ( OrderType () == OP_SELL)
      {
         if ( OrderClosePrice ()- OrderOpenPrice ()< 0 )
         {
            ticket = OrderSend ( Symbol (),OP_SELL,lots,Bid,slip,Ask+TS* Point ,Ask-TP* Point , 0 ,Magic, 0 , Red );
         }
         if ( OrderClosePrice ()- OrderOpenPrice ()> 0 )
         {
             double lot2 = volumz* 2 ; 
            ticket = OrderSend ( Symbol (),OP_BUY,lot2,Ask,slip,Bid-TS* Point ,Bid+TP* Point , 0 ,Magic, 0 , Green );
         }
      }
   }   
}

즉, 여기에 하나의 주요 기능이 있고 다른 두 개는 단순히 복제합니다. 보험을 위해 만들어졌지만 여전히 작동하지 않습니다.

 
CLAIN :


가장 흥미로운 점은 테스터에 문제가 없다는 것입니다. 2000년부터 현재까지 배수관 없이 운영되고 있다.

코드가 도움이 될까요?

즉, 여기에 하나의 주요 기능이 있고 다른 두 개는 단순히 복제합니다. 보험을 위해 만들어졌지만 여전히 작동을 멈춥니다.

매우 이상한 코드입니다. 초기화에서 위치를 열고 for 연산자 없이 주문을 반복한다는 것은 정말 혼란스럽습니다. 아직 본 적이 없습니다. 코드에 동일한 Print()를 모두 삽입합니다. 저를 믿으십시오.
 
CLAIN :


가장 흥미로운 점은 테스터에 문제가 없다는 것입니다. 2000년부터 현재까지 배수관 없이 운영되고 있다.

코드가 도움이 될까요?

즉, 여기에 하나의 주요 기능이 있고 다른 두 개는 단순히 복제합니다. 보험을 위해 만들어졌지만 여전히 작동하지 않습니다.

테스터: 손절매 #68 at 1.2887 (1.2885 / 1.2887)
16:56:31 2010.07.15 15:04 마틴 EURUSD,M30: 주문량 = 1
16:56:31 2010.07.15 15:04 테스터: 2.00 EURUSD at 1.2887 sl: 1.1885 tp: 1.2905 [2010.07.15 15:04]를 살 돈이 부족합니다 .
16:56:31 2010.07.15 15:04 테스터: PrevBalance: 1838.36, PrevPL: 0.00, PrevEquity 1838.36, PrevMargin: 0.00, NewMargin: 2577, FreeMargin: -738.
16:56:31 2010.07.15 15:04 martin EURUSD,M30: OrderSend 오류 134

TP=1000 및 SL=1000은 너무 많다고 생각합니다. lot=1.0 은행에 바닥 없는 은행이 필요하다는 사실에도 불구하고))

작은 로트, 음, TP를 각각 넣으려고 하면 행복할 것이라고 생각합니다.

 

사람들!!!!!!!!! 돕다! 다시 부탁해!!! 또한 질문: 지표가 EURUSD에서만 MT4로 열리는 이유는 무엇입니까!!!!!!!!!!!!!!!!! 일종의 역설. 표시기의 쌍에는 제한이 없으며 Symbol()은 어디에나 있으며 계정의 주요 기능은 Order 및 Account 입니다. 표시기를 삭제하면 다른 쌍에도 로드되지 않거나 MT4가 꺼질 때까지 완전히 멈춥니다. 지표를 직접 작성했습니다. 나는 다른 커플들과 이런 행동을 이해할 수 없다. 지표가 길기 때문에 게시하지 않습니다. 하지만 유로달러에서만 문제 없이 작동하는 부자연스러운 것은 없다고 장담합니다 ????????????????????????????????

PROFIS surround the REBUS))))))))))))))))))))))))))))))))))) 나는 방법이 없다....... ... .......

다음은 사용된 기능을 발췌한 것입니다.

++++++++++++++++++++++++++++++++++++++++ 코드 건너뛰기

//--- 합계 개체 삭제
Del_comment("MN1 트렌드");
Del_comment("W1 트렌드");
Del_comment("D1 트렌드");
Del_comment("H4 트렌드");
Del_comment("H1 트렌드");
Del_comment("또는 .#: ");
Del_comment("또는 .#: ");
//---
TRENDS("MN1 트렌드",PERIOD_MN1, 1.86, 33, Lab_Trend_Bull,Lab_Trend_Bear,Lab_Trend_Doj, 42);
TRENDS("W1 추세", PERIOD_W1, 1,111, 48, Lab_Trend_Bull, Lab_Trend_Bear,Lab_Trend_Doj, 12);
TRENDS("D1 추세", PERIOD_D1, 1.97, 48, Lab_Trend_Bull,Lab_Trend_Bear,Lab_Trend_Doj, 12);
TRENDS("H4 추세", PERIOD_H4, 1,111, 62, Lab_Trend_Bull, Lab_Trend_Bear,Lab_Trend_Doj,12);
TRENDS("H1 추세", PERIOD_H1, 1.97, 62, Lab_Trend_Bull,Lab_Trend_Bear,Lab_Trend_Doj, 12);

str=StringLen(계정회사());
if(str<=31) shf=31-str;
또 다른
if(str>=31) shf=0;
Commen("NameCo",AccountCompany(), 1, shf, 40, "Times New Roman", color_Fon,7);
Commen("in", "ABC v2", 1, 36, 51, "Times New Roman", color_Fon,11);
Commen("txt_symb",Symbol(), 1, 3, 64, "타임즈 뉴 로만", color_Fon,16);

if(OffABC==true)
Commen("off+", "OFF", 1, 7, 51, "Times New Roman", color_Loss,10);

if(OffABC==거짓)
{
Commen("in+", "INC", 1, 7, 51, "Times New Roman", color_Profit,10);
int OneLot= MarketInfo(Symbol(),MODE_MARGINREQUIRED);
int TickValue = MarketInfo(Symbol(),MODE_TICKVALUE);

if(숫자==2) 핍=100;
또 다른
if(숫자==3) 핍=1000;
또 다른
if(숫자==4) 핍=10000;
또 다른
if(숫자==5) 핍=100000;

if(!IsConnected())
{
ObjectDelete("+");
Commen("off+", "OFF", 1, 7, 51, "Times New Roman", color_Loss,10);
Commen("noconnect", "연결되지 않음", 1, 7, 85, "Times New Roman", color_Loss,14);
}
또 다른
if(IsConnected())
{
ObjectDelete("오프+");
ObjectDelete("연결 없음");
Commen("in+", "INC", 1, 7, 51, "Times New Roman", color_Profit,10);
}

if(AccountCurrency()=="RUB")
{
EQ_USD= AccountEquity()/iClose("USDRUB",PERIOD_M1,0);
FreeMargin_USD= (AccountFreeMargin()-AccountStopoutLevel())/iClose("USDRUB",PERIOD_M1,0);
PRF_USD= AccountProfit()/iClose("USDRUB",PERIOD_M1,0);
LOT_01= (AccountFreeMargin()-AccountStopoutLevel())/(OneLot/10);
LOT_1= (AccountFreeMargin()-AccountStopoutLevel())/OneLot;
ObjectDelete("노드포");
}
또 다른
if(AccountCurrency()=="RUR")
{
EQ_USD= AccountEquity()/iClose("USDRUR",PERIOD_M1,0);
FreeMargin_USD= (AccountFreeMargin()-AccountStopoutLevel())/iClose("USDRUR",PERIOD_M1,0);
PRF_USD= AccountProfit()/iClose("USDRUR",PERIOD_M1,0);
LOT_01= (AccountFreeMargin()-AccountStopoutLevel())/(OneLot/10);
LOT_1= (AccountFreeMargin()-AccountStopoutLevel())/OneLot;
ObjectDelete("노드포");
}
또 다른
if(AccountCurrency()=="유로")
{
EQ_USD= AccountEquity()*iClose("EURUSD",PERIOD_M1,0);
FreeMargin_USD= (AccountFreeMargin()-AccountStopoutLevel())*iClose("EURUSD",PERIOD_M1,0);
PRF_USD= AccountProfit()*iClose("EURUSD",PERIOD_M1,0);
LOT_01= (AccountFreeMargin()-AccountStopoutLevel())*(OneLot/10);
LOT_1= (AccountFreeMargin()-AccountStopoutLevel())*OneLot;
ObjectDelete("노드포");
}
또 다른
if(AccountCurrency()=="USD")
{
EQ_USD= AccountEquity();
FreeMargin_USD= AccountFreeMargin()-AccountStopoutLevel();
PRF_USD= AccountProfit();
LOT_01= FreeMargin_USD/(OneLot/10);
LOT_1= FreeMargin_USD/OneLot;
ObjectDelete("노드포");
}

if(IsConnected() && AccountCurrency()!="RUB" && AccountCurrency()!="RUR" && AccountCurrency()!="EUR" && AccountCurrency()!="USD")
{
ObjectDelete("+");
ObjectDelete("연결 없음");
Commen("off+", "OFF", 1, 7, 51, "Times New Roman", color_Loss,10);
Commen("depo_symbl",AccountCurrency(), 1, 112, 85, "Times New Roman", color_Equity_Account,14);
Commen("nodepo"," 실행 불가능", 1, 7, 85, "Times New Roman", color_Free,14);
}
//---

if(주문_OK==거짓) 주문=1;
주문=0;

if(OrdersTotal()>=주문)
{
for(int pos=OrdersTotal(); pos>=0; pos--)
{
if(주문선택(pos,SELECT_BY_POS,MODE_TRADES))
{
if (OrderSymbol()!=Symbol()) 계속
{
SUMM=SUMM+OrderLots();
스왑=스왑+주문 스왑();
COMMIS=COMMIS+주문수수료();
OpenPrice=OpenPrice+OrderOpenPrice();

//--- //베이 주문
if(주문 유형()==OP_BUY)
{
baylot=OrderLots();
if(baylot>=1 && baylot<99.0)
{
bSL1= bSL1+(OrderStopLoss());
bTP1= bTP1+(OrderTakeProfit());
bOPN1= bOPN1+OrderOpenPrice();
if(bSL1>0) bsumL1=bsumL1+1;
if(bTP1>0) bsumP1=bsumP1+1;
if(bOPN1>0) bsumO1=bsumO1+1;
}
if(baylot>=0.1 && baylot<0.99)
{
bSL01= bSL01+(OrderStopLoss());
bTP01= bTP01+(OrderTakeProfit());
bOPN01= bOPN01+OrderOpenPrice();
if(bSL01>0) bsumL01=bsumL01+1;
if(bTP01>0) bsumP01=bsumP01+1;
if(bOPN01>0) bsumO01=bsumO01+1;
}
} //OP_BUY

++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++ 건너뛰기 코드

기능

void TRENDS(문자열 이름, int PER, int n, int X, int Y, 색상 Lab_Trend_Bull, 색상 Lab_Trend_Bear, 색상 Lab_Trend_Doj, int rsm)
{
int A,B,a,b,cod;
더블 Fup, Fdw;
이중 OPEN= iOpen(Symbol(),PER,1);
이중 닫기 = iClose(Symbol(),PER,1);
이중 EMA21= iMA(Symbol(),PER,21,0,MODE_EMA,PRICE_CLOSE,1);
이중 EMA89= iMA(Symbol(),PER,89,0,MODE_EMA,PRICE_CLOSE,1);
문자열 이름2;
색상 color_trend;
bool FLEAT=거짓;

동안(A<1)
{
이중 FUPPER= iFractals(Symbol(),PER,MODE_UPPER,a);
if(FUPPER>0) { Fup=FUPPER; ++; }
++;
}
동안(B<1)
{
이중 FLOWER= iFractals(Symbol(),PER,MODE_LOWER,b);
if(꽃>0) { Fdw=꽃; B++; }
ㄴ++;
}
if((CLOSE>=OPEN && CLOSE<Fup) || (CLOSE<=OPEN && CLOSE>Fdw))
FLEAT=참;

if(EMA21>EMA89 && FLEAT==true)
{ 코드 = 114; color_trend=Lab_Trend_Doj; name2= "EMA21>eme89"; } // 황소
또 다른
if(EMA21<EMA89 && ((CLOSE>=OPEN && CLOSE>=Fup) || (CLOSE<=OPEN && CLOSE>=Fup)))
{ 코드 = 111; color_trend=Lab_Trend_Bull; name2="프랙탈 UPPER"; } // 황소
또 다른
if(EMA21>EMA89 && ((CLOSE>=OPEN && CLOSE>=Fup) || (CLOSE<=OPEN && CLOSE>=Fup)))
{ 코드 = 110; color_trend=Lab_Trend_Bull; name2= "EMA21>ema89 + FRACTAL UPPER"; } // 황소
또 다른
if(EMA21<EMA89 && FLEAT==true)
{ 코드 = 113; color_trend=Lab_Trend_Doj; name2= "ema21<EMA89"; } // 곰
또 다른
if(EMA21>EMA89 && ((CLOSE<=OPEN && CLOSE<=Fdw) || (CLOSE>=OPEN && CLOSE<=Fdw)))
{ 코드 = 111; color_trend=Lab_Trend_Bear; name2="프랙탈 LOWER"; } // 곰
또 다른
if(EMA21<EMA89 && ((CLOSE<=OPEN && CLOSE<=Fdw) || (CLOSE>=OPEN && CLOSE<=Fdw)))
{ 코드 = 110; color_trend=Lab_Trend_Bear; name2= "ema21<EMA89 + 프랙탈 LOWER"; } // 곰
또 다른
if(EMA21==EMA89 || FLEAT==참)
{ 코드 = 110; color_trend=Lab_Trend_Doj; name2= "ema21==ema89 || 프랙탈"; } //도지

이름=이름+" "+이름2;
if(PER==PERIOD_MN1) 대구= 111;
if(코드==110)
{ rsm=rsm+3; X=X-1; Y=Y-3; }

ObjectCreate(이름, OBJ_LABEL ,0,0,0);
ObjectSet(이름, OBJPROP_CORNER, n);
ObjectSet(이름, OBJPROP_XDISTANCE,X);
ObjectSet(이름, OBJPROP_YDISTANCE,Y);
ObjectSetText(이름,CharToStr(대구), rsm,"윙딩",color_trend);
}
void Commen(문자열 이름, 문자열 txt, int n, int X, int Y, 문자열 srift, 색상 clr, int rsm)
{
ObjectCreate(이름,OBJ_LABEL,0,0,0);
ObjectSet(이름, OBJPROP_CORNER, n);
ObjectSet(이름, OBJPROP_XDISTANCE,X);
ObjectSet(이름, OBJPROP_YDISTANCE,Y);
ObjectSetText(이름, txt, rsm, 글꼴, clr);
}

+++++++++++++++++++++++++++++++++++++++++++++ 및 화면에 출력

 
nlp2311 :

...

+++++++++++++++++++++++++++++++++++++++++++++ 및 화면에 출력


"++++++++++++++++++++++++++++++++++++++++++++++ 및 출력 화면"

그리고 코드를 올바르게 붙여넣는 방법을 배우십시오. 아무도 당신의 시트를 신경 쓰지 않습니다 ...

여기에서 모든 것을 읽으십시오.

 
메타트레이더 비밀번호를 잊어버렸습니다. 어떻게 새 비밀번호를 만들 수 있습니까? 누구에게 연락할 수 있습니까?