[UYARI, KONU KAPALI!] Forumu kirletmemek için herhangi bir acemi sorusu. Profesyonel, kaçırmayın. Sensiz hiçbir yerde. - sayfa 92

 
Shniperson >> :
Kral. ve H4'te işlem yaparken H1'deki çubukların değerlerinin dikkate alınması için nasıl yapılır? örneğin if(......&& Kapat[0](H1 çubuğu)>Yüksek[1](H1 çubuğu) ???????????

iClose() ve iHigh() kullanın - bu işlevlerde isteğe bağlı bir zaman aralığı ayarlayabilirsiniz

 
Bir arabelleği diğerine atamanın neden doğru olmadığını anlayamıyorum (Buffer1'in sonucu gösterge penceresinde görüntülenmiyor). Ve ikinci soru, gösterge, yalnızca mevcut sıfırla sınırlıyken neden sıfır çubuğunu ve bir öncekini (limit=2) hesaplamalı?

#property indicator_separate_window
#property indicator_buffers 1

extern int FastMA=3;
extern int SlowMA=25;

double Buffer1[];


double Buffer2[];

int init()
{
  SetIndexBuffer(0,Buffer1);
  SetIndexBuffer(1,Buffer2);
  return(0);
}

int start()
{
  int limit,counted_bars;
  counted_bars=IndicatorCounted();   //counted_bars=Bars-1
  if(counted_bars>0) counted_bars--; //??? counted_bars=Bars-1-1
  limit=Bars-counted_bars;     //лимит теперь равен двум
  for(int i=0; i<limit; i++){
     Buffer2[i]=MathAbs(Close[i]-Open[i]);
  }
  for(i=0; i<limit; i++){
    Buffer1[i]=Buffer2[i]*(-1);
  }
}

 
Sevgili programcılar, lütfen gösterge sıfırı geçtiğinde çalacak olan göstergeye bir ses eklemeye yardımcı olun. Teşekkür ederim!
Dosyalar:
 
C-4 >> :
Bir arabelleği diğerine atamanın neden doğru olmadığını anlayamıyorum (Buffer1'in sonucu gösterge penceresinde görüntülenmiyor).

Çizim arabelleğinde SetIndexStyle(0,DRAW_LINE) yok; , ve hesaplanan IndicatorBuffers(2) için;



 
Bingo! Eh, elbette IndicatorBuffers (2), SetIndexBuffer belirtmenin yeterli olacağını düşündüm. Bu arada, SetIndexStyle(0,DRAW_LINE) olmadan bile çiziyorum, ince siyah bir çizgi çıkıyor - varsayılan ayarlar etkin.
 

Merhaba bilenler.

Sadece açık siparişleri kapatan bir danışman yaptım! ( yarı otomatik ticaret ).

Kapanış kuralları: SHELL kapanışı 1 pip yukarı kırılırsa, ana kapanış fiyat kanalını takip eder,

1 pip aşağı BAY'i kapatırsa. ek olarak, belirli bir mesafedeki birkaç nokta için bir başabaş sigortası ayarlanmıştır.

Bir sorum var, her şeyi doğru yaptım mı, kod doğru mu !!??

 extern bool check = false ; 
extern int PeriodP = 12 ; 
extern double TrailingStop = 35 ; // расстояние после которого будем устанавливать безубыток
extern double X = 5 ; //установка в + 5 пунктов! 
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int start ( )
  {
   double P_up0 , P_down0 , P_up1 , P_down1 ;
   int cnt , total ;

  P_up0 = iCustom ( Symbol ( ) , Period ( ) , "Ценовой канал" , PeriodP , 0 , 0 ) ;
  P_down0 = iCustom ( Symbol ( ) , Period ( ) , "Ценовой канал" , PeriodP , 1 , 0 ) ;
  P_up1 = iCustom ( Symbol ( ) , Period ( ) , "Ценовой канал" , PeriodP , 0 , 1 ) ;
  P_down1 = iCustom ( Symbol ( ) , Period ( ) , "Ценовой канал" , PeriodP , 1 , 1 ) ;

    
   for ( cnt = OrdersTotal ( ) - 1 ; cnt > = 0 ; cnt - - ) {
      OrderSelect ( cnt , SELECT_BY_POS , MODE_TRADES ) ;
      if ( OrderType ( ) < = OP_SELL & &    OrderSymbol ( ) = = Symbol ( ) )   {
         if ( OrderType ( ) = = OP_BUY ) 
            {
                 OrderClose ( OrderTicket ( ) , OrderLots ( ) , Bid , 3 , Violet ) ; 
                 return ( 0 ) ; 
                }
            if ( TrailingStop > 0 )  
              {                  
               if ( Bid - OrderOpenPrice ( ) > Point * TrailingStop )
                 {
                  if ( OrderStopLoss ( ) < Bid - Point * TrailingStop & & OrderStopLoss ( ) ! = OrderOpenPrice ( ) + X * Point )
                    {
                     OrderModify ( OrderTicket ( ) , OrderOpenPrice ( ) , OrderOpenPrice ( ) + X * Point , OrderTakeProfit ( ) , 0 , Green ) ;
                     return ( 0 ) ;
                    }
                 }
              }
           }
         else  
         {
            
            if ( P_up1 < P_up0 ) 
            {
               OrderClose ( OrderTicket ( ) , OrderLots ( ) , Ask , 3 , Violet ) ; 
               return ( 0 ) ; 
              }
            if ( TrailingStop > 0 )  
              {               
               if ( ( OrderOpenPrice ( ) - Ask ) > ( Point * TrailingStop ) )
                 {
                  if ( NormalizeDouble ( OrderStopLoss ( ) , Digits ) ! = NormalizeDouble ( OrderOpenPrice ( ) - X * Point , Digits ) )
                    {
                     OrderModify ( OrderTicket ( ) , OrderOpenPrice ( ) , OrderOpenPrice ( ) - X * Point , OrderTakeProfit ( ) , 0 , Red ) ;
                     return ( 0 ) ;
                    }
                 }
              }
            
           }
        }
     
   if ( check ) Order_Open ( ) ;
   return ( 0 ) ;
  }
//+------------------------------------------------------------------+

void Order_Open ( ) {
   if ( OrdersTotal ( ) < = 1 ) {
      OrderSend ( Symbol ( ) , OP_BUY , 0.1 , Ask , 3 , 0 , 0 , "" , 20080421 , 0 ) ;
      OrderSend ( Symbol ( ) , OP_SELL , 0.1 , Bid , 3 , 0 , 0 , "" , 20080421 , 0 ) ;
   }
}
 
Uzun bir pozisyonu kapatmak için herhangi bir koşul yok, şimdi Buy emri yine de kapanacak.
Sipariş aramanız varsa, OrderSelect - RefreshRates()'den önce veya sonra koyduğunuzdan emin olun.
 
Roger >> :
Uzun bir pozisyonu kapatmak için herhangi bir koşul yok, şimdi Buy emri yine de kapanacak.

Bir hata bulundu. AL kapanışını gerçekten kaçırdı.

son sürüm. en azından derleme hatasız geçti.

 extern bool check = false ; 
extern int PeriodP = 12 ; 
extern double TrailingStop = 35 ; // расстояние после которого будем устанавливать безубыток
extern double X = 5 ; //установка в + 5 пунктов! 
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int start ( )
  {
   double P_up0 , P_down0 , P_up1 , P_down1 ;
   int cnt , total ;

  P_up0 = iCustom ( Symbol ( ) , Period ( ) , "Ценовой канал" , PeriodP , 0 , 0 ) ;
  P_down0 = iCustom ( Symbol ( ) , Period ( ) , "Ценовой канал" , PeriodP , 1 , 0 ) ;
  P_up1 = iCustom ( Symbol ( ) , Period ( ) , "Ценовой канал" , PeriodP , 0 , 1 ) ;
  P_down1 = iCustom ( Symbol ( ) , Period ( ) , "Ценовой канал" , PeriodP , 1 , 1 ) ;

    
   for ( cnt = OrdersTotal ( ) - 1 ; cnt > = 0 ; cnt - - ) {
      OrderSelect ( cnt , SELECT_BY_POS , MODE_TRADES ) ;
      if ( OrderType ( ) < = OP_SELL & &    OrderSymbol ( ) = = Symbol ( ) )   {
         if ( OrderType ( ) = = OP_BUY ) {  
            
            if ( P_down1 > P_down0 ) {
                 OrderClose ( OrderTicket ( ) , OrderLots ( ) , Bid , 3 , Violet ) ; 
                 return ( 0 ) ; 
                }
            if ( TrailingStop > 0 )  
              {                  
               if ( Bid - OrderOpenPrice ( ) > Point * TrailingStop )
                 {
                  if ( OrderStopLoss ( ) < Bid - Point * TrailingStop & & OrderStopLoss ( ) ! = OrderOpenPrice ( ) + X * Point )
                    {
                     OrderModify ( OrderTicket ( ) , OrderOpenPrice ( ) , OrderOpenPrice ( ) + X * Point , OrderTakeProfit ( ) , 0 , Green ) ;
                     return ( 0 ) ;
                    }
                 }
              }
           }
            else  
            {
               OrderClose ( OrderTicket ( ) , OrderLots ( ) , Ask , 3 , Violet ) ; 
               return ( 0 ) ; 
              }
            if ( TrailingStop > 0 )  
              {               
               if ( ( OrderOpenPrice ( ) - Ask ) > ( Point * TrailingStop ) )
                 {
                  if ( NormalizeDouble ( OrderStopLoss ( ) , Digits ) ! = NormalizeDouble ( OrderOpenPrice ( ) - X * Point , Digits ) )
                    {
                     OrderModify ( OrderTicket ( ) , OrderOpenPrice ( ) , OrderOpenPrice ( ) - X * Point , OrderTakeProfit ( ) , 0 , Red ) ;
                     return ( 0 ) ;
                    }
                 }
              }
            
           }
        
     }
   if ( check ) Order_Open ( ) ;
   return ( 0 ) ;
  }
//+------------------------------------------------------------------+

void Order_Open ( ) {
   if ( OrdersTotal ( ) < = 1 ) {
      OrderSend ( Symbol ( ) , OP_BUY , 0.1 , Ask , 3 , 0 , 0 , "" , 20080421 , 0 ) ;
      OrderSend ( Symbol ( ) , OP_SELL , 0.1 , Bid , 3 , 0 , 0 , "" , 20080421 , 0 ) ;
   }
}
 

çok "basit" bir soru: Mevduat para biriminde 1 (bir) açık endeks lotunun fiyatı nasıl hesaplanır?

örnek: dün 1 lot nikkei fiyatı açılış anında 9400 puan açtı. soru: açılış anında mevduat para biriminde 9400 (rehin DEĞİL! Yani lot fiyatı) ne kadar para olduğunu nasıl öğrenebilirim?

 
jobber писал(а) >>

çok "basit" bir soru: Mevduat para biriminde 1 (bir) açık endeks lotunun fiyatı nasıl hesaplanır?

örnek: dün 1 lot nikkei fiyatı açılış anında 9400 puan açtı. soru: açılış anında mevduat para biriminde 9400 (rehin DEĞİL! Yani lot fiyatı) ne kadar para olduğunu nasıl öğrenebilirim?

Ve MarketInfo() ilgili parametreye yardımcı olmaz

Neden: