프랙탈 브레이크 아웃 멈춤 - 페이지 6

 

먼저 해당 브래킷에 대해

이것 좀 봐

 int total = OrdersTotal ();
if (total< 1 )
{

//--------------------------------------//
//------------Money Management----------//
 if (Money.Management)
   {
       if (Risk< 1 || Risk> 1000 )
      {
         Comment ( "Invalid Risk Value." );
         return ( 0 );
      }
       else
      {
         Lots= MathFloor ((AccountFreeMargin()*AccountLeverage()*Risk*pips2dbl* 100 )/(Ask*MarketInfo( Symbol (),MODE_LOTSIZE)*MarketInfo( Symbol (),MODE_MINLOT)))*MarketInfo( Symbol (),MODE_MINLOT);
      }
   }
//------------------------------------------//
//-------------EMA SETTINGS-----------------//
double EMA= iMA ( NULL , 0 ,MA_Period,MA_Shift,MA_Type,MA_Price, 0 );
double BarClose;
BarClose=Bid;

//---------------------------------------------------------//
//-----------------FRACTALS--------------------------------//
double fractalU= iFractals ( NULL ,Fractal_TF, 1 ,Fractal_Buffer);
double fractalD= iFractals ( NULL ,Fractal_TF, 2 ,Fractal_Buffer);
Print ( "This Up Fractal is" ,fractalU, "Down Fractal is" ,fractalD);

//----------------PRCOESSING BUY---------------------------//
if (BarClose>EMA && BarClose== fractalU)
{
double SLB=Bid-StopLoss*pips2dbl;
double TPB=Bid+TakeProfit*pips2dbl;
int buy= OrderSend ( Symbol (), 0 ,Lots,Ask,Slippage*pips2points, 0 , 0 );
}

if (buy> 0 ) 
{
OrderSelect (buy,SELECT_BY_TICKET,MODE_TRADES);
OrderModify(buy,OrderOpenPrice(),SLB,TPB, 0 ,Green);
}

//---------PROCESSING SELL---------//
if (BarClose<EMA&&BarClose==fractalD)
{
double SLS=Ask+StopLoss*pips2dbl;
double TPS=Ask-TakeProfit*pips2dbl;

int sell= OrderSend ( Symbol (), 1 ,Lots,Bid,Slippage*pips2points, 0 , 0 );
}

if (sell> 0 )
{
OrderSelect (sell,SELECT_BY_TICKET,MODE_TRADES);
OrderModify(sell,OrderOpenPrice(),SLS,TPB, 0 ,Green);
}




//----------------------------------------------//
//-----------------EXITING ORDERS---------------//

for ( int i= OrdersTotal ()- 1 ; i>= 0 ;i--)          <===HOW Can be here one trade in the loop if OrdersTotal() < 1 
{
if ( OrderSelect (i,SELECT_BY_POS,MODE_TRADES)== false )   break ;

if (OrderMagicNumber()!=MagicNumber || OrderSymbol() != Symbol ()) continue ;

double SL=OrderStopLoss();
bool result;
int   error;
//-----The Differnt Order types---//

if (OrderType()==OP_BUY)
{

   if (BreakEven> 0 )
  {
   
     if (Bid-OrderOpenPrice() >=BreakEven*pips2dbl)
     {
      
         if (OrderStopLoss() <OrderOpenPrice())
        {
         
          SL=OrderOpenPrice()+ Point ;
        }
     }
  }
}
                  
          

if (OrderType()==OP_SELL){

 if (BreakEven> 0 )
 {
  
     if (OrderOpenPrice()-Ask >= BreakEven*pips2dbl)
    {
     
       if (OrderStopLoss()>OrderOpenPrice())
       {
        
          SL=OrderOpenPrice() - Point ;
    
       }
    }
  }
}


if (SL != OrderStopLoss()) result=OrderModify(OrderTicket(),OrderOpenPrice(),SL,OrderTakeProfit(), 0 , CLR_NONE );
         if (result!=TRUE) { error= GetLastError (); Print ( "ModifyError = " ,OrderTicket(), "   " ,error);}     
}
return ( 0 );
} //THIS IS THE BRACKET FOR ORDERS OPEN CLOSE********************

나는 당신이 여기에서 지적한 것을 설명 할 수 있다고 생각하지 않습니다 ....

 

프랙탈 에 대해 ...... 이 테스트는 무엇을 하고 있습니까 ???

   double fractalU;
   for ( int y= 0 ;fractalU < Point ;y++)
     {
      fractalU= iFractals ( NULL , 0 , 1 ,y);
       Alert ( "fractalUp  y =  " +y+ " " +fractalU);
     } 

동일한 작업을 수행하면 올바른 프랙탈바를 얻기 위해 어떤 막대를 선택해야 하는지 알 수 있습니다.

.

프랙탈이 항상 같은 막대에 있습니까 ???

 

나는 다음에 대해 본다:

거래가 없으면 이 루프에 들어가는 것이 불가능합니다. 다른 주문 회계 섹션을 코딩해야 합니다.

 for ( int i= OrdersTotal ()- 1 ; i>= 0 ;i--)          <===HOW Can be here one trade in the loop if OrdersTotal() < 1 
{

 
deVries :

프랙탈에 대해 ......이 테스트는 무엇을 하고 있습니까 ???

동일한 작업을 수행하면 올바른 프랙탈바를 얻기 위해 어떤 막대를 선택해야 하는지 알 수 있습니다.

.

프랙탈이 항상 같은 막대에 있습니까 ???


예, 프랙탈 업 또는 프랙탈 다운에 관계없이 항상 같은 막대에 있습니다....

 
//---------------FRACTAL INPUTS--------------------//
extern string Label6= "===FRACTAL INPUTS===" ;
extern int     Fractal_Buffer= 0 ;
extern int     Fractal_TF= 0 ;


//--------Start Funcitons-------//
int start()
{

//-----------------FRACTALS--------------------------------//
double fractalU= iFractals ( NULL ,Fractal_TF, 1 ,Fractal_Buffer);
double fractalD= iFractals ( NULL ,Fractal_TF, 2 ,Fractal_Buffer);
Print ( "This Up Fractal is" ,fractalU, "Down Fractal is" ,fractalD);

귀하의 코드 Fractal_Buffer = 0 항상 0

내가 한 테스트는 막대 0에서 찾을 프랙탈이 없다는 것을 보여주었습니다.

테스트를 해보세요........... 배우기

   double fractalU;
   for ( int y= 0 ;fractalU < Point ;y++)
     {
      fractalU= iFractals ( NULL , 0 , 1 ,y);
       Alert ( "fractalUp  y =  " +y+ " " +fractalU);
     } 
 

내가 찾은 결과를 전달하는 데 그렇게 나쁜 일을 해서 미안합니다.


나는 테스트를 실행했고 예, 막대 0에 프랙탈 이 없습니다.

Fractal_Buffer 대신 사용할 y를 찾기 위해 for(loop)를 사용하기를 원합니다. 항상 =0으로 설정해서는 안 되기 때문입니다.

 
ZacharyRC :

내가 찾은 결과를 전달하는 데 그렇게 나쁜 일을 해서 미안합니다.


나는 테스트를 실행했고 예, 막대 0에 프랙탈이 없습니다.

Fractal_Buffer 대신 사용할 y를 찾기 위해 for(loop)를 사용하기를 원합니다. 항상 =0으로 설정해서는 안 되기 때문입니다.




   double fractalU;
   for ( int y= 0 ;fractalU < Point ;y++)
     {
      fractalU= iFractals ( NULL , 0 , 1 ,y);
     } 
     
double fractalD;
for ( int x= 0 ;fractalD< Point ;x++)
 {
 fractalD= iFractals ( NULL , 0 , 2 ,x);
 }

 

내가 코딩에 대해 이해하기 위해 애쓰고 있는 것은 EA가 여전히 잘못된 다른 프랙탈 코드와 올바른 거래를 하고 있다는 것입니다.

또한 정류장을 한 번 움직이는 것은 잘못된 시간 필터를 제거했을 때 발생하지 않았습니다.


저는 현재 주문 회계 업무를 하고 있습니다. 하지만 이 책은 창의성을 필요로 하는 많은 일들을 어렵게 만듭니다.


큰 인내심에 감사드립니다!

 
아하하하하하하 이거때문에 정류장을 못옮깁니다 하하하 엄청 느려요
 int total = OrdersTotal ();
if (total< 1 )
{