[ARŞİV!] Forumu kirletmemek için herhangi bir acemi sorusu. Profesyonel, kaçırmayın. Sensiz hiçbir yerde - 4. - sayfa 451
Alım-satım fırsatlarını kaçırıyorsunuz:
- Ücretsiz alım-satım uygulamaları
- İşlem kopyalama için 8.000'den fazla sinyal
- Finansal piyasaları keşfetmek için ekonomik haberler
Kayıt
Giriş yap
Gizlilik ve Veri Koruma Politikasını ve MQL5.com Kullanım Şartlarını kabul edersiniz
Hesabınız yoksa, lütfen kaydolun
Bunu düşünmek istemediğimi anlıyorum, ancak sorun sizin için açıksa en azından bir ipucu verebilir misiniz?
Lütfen tüm kodu sağlayın
Hayır, bu yalnızca verilerin bir tarih parçasıyla eşleştiği anlamına gelir.
Örneğin, bunları manuel olarak da sürebilirsiniz. Veya bir metin dosyasından yazın. Veya kasada alın.
Sonuçta, "1.25 1.16 1.73 1.35" bazı koşullu verileri kullanarak bile, yıllar önce bazı para birimleri için tarihe girebiliriz. Ancak bu, bir zaman serisi dizisi düzenlediğimiz anlamına gelmez.
Orijinal komut dosyasını biraz değiştirdi:
1. Özel diziye yalnızca son 5 açılış fiyatı kopyalandı.
2. Ras-Comment-oval, kopyalanan 5 açılış fiyatının tümü için özel dizi aldı.
Bunu anladım:
Şekilden de görülebileceği gibi açılış fiyatları ters sırada endekslenmiştir (barın açılış fiyatının SAYISI (ARTAN sırayla) ve barın açılış fiyatının ZAMANI (AZAN sırayla) ile kanıtlandığı gibi), yani. dizi, bir zaman dizisi dizisi olarak düzenlenmiştir.
ANCAK ArrayGetAsSeries işlevi hala 0 (yanlış) döndürür; bu, özel dizinin bir zaman dizisi dizisi olarak DÜZENLENMEDİĞİ anlamına gelir.
açıklık getirmeni rica ediyorum
Soru : nasıl açıklanır?
PS Sorularıma cevap verdiğiniz için teşekkürler.
Orijinal komut dosyasını biraz değiştirdi:
1. Özel diziye yalnızca son 5 açılış fiyatı kopyalandı.
2. Ras-Comment-oval, kopyalanan 5 açılış fiyatının tümü için özel dizi aldı.
Bunu anladım:
Şekilden de görülebileceği gibi açılış fiyatları ters sırada endekslenmiştir (barın açılış fiyatının SAYISI (ARTAN sırayla) ve barın açılış fiyatının ZAMANI (AZAN sırayla) ile kanıtlandığı gibi), yani. dizi, bir zaman dizisi dizisi olarak düzenlenmiştir.
ANCAK ArrayGetAsSeries işlevi hala 0 (yanlış) döndürür; bu, özel dizinin bir zaman dizisi dizisi olarak DÜZENLENMEDİĞİ anlamına gelir.
açıklık getirmeni rica ediyorum
Soru : nasıl açıklanır?
PS Sorularıma cevap verdiğiniz için teşekkürler.
Özellikleri denemedim.
Özellikleri denemedim.
i_maTF == Dönem() ??????,
i_maPeriod makul bir değer alıyor???
i_maShiftByPrice ile ilgili bir sorun olabilir mi???
Tam olarak söylemek zor.
Yanlış bilgi görüntüler. İşte tam kod:
Uzman günlüğünde aşağıdakileri verir:
Gördüğünüz gibi, i_maTF, i_maPeriod ve i_maPrice değişkenleri başlattığımla aynı değil. Sorun nedir?
Yanlış bilgi görüntüler. İşte tam kod:
Uzman günlüğünde aşağıdakileri verir:
Gördüğünüz gibi, i_maTF, i_maPeriod ve i_maPrice değişkenleri başlattığımla aynı değil. Sorun nedir?
Verdiğiniz kod derlenmiyorsa, günlükte nasıl bir şey almayı başardığınızı merak ediyorum ???
Ve derlerseniz, hiçbir tuhaflık olmayacak.
Verdiğiniz kod derlenmiyorsa, günlükte nasıl bir şey almayı başardığınızı merak ediyorum ???
Ve derlerseniz, tuhaflıklar olmayacak.
Her zaman her şeyi normal şekilde derlerim.
Kimsenin kafasını karıştırmamak için kodu gereksiz baskılardan ve değişkenlerden temizledim. Ama aşağıda onları görmek için kaldırmadım, o yüzden derlemedim. İşte derleyen tam kod:
Bana yardım et lütfen! Expert Advisor'da yeni bir sipariş açıldığında eskisinin kapanması için nasıl yapılır? Test cihazında iyi çalışıyor, ancak gerçekte, bir nedenden dolayı, yenisini açtığınızda eskisi gidiyor ????????? Programlamada nihayet sıfırlayabiliyorum (((
//ooooooooooooooooooooooooooooooooooooooooooooooooo
extern bool In_BUY=true;
extern int SL_buy=62; //---входные параметры по лонгам
extern int Risk_buy=0;
//ooooooooooooooooooooooooooooooooooooooooooooooooo
extern bool In_SELL=true;
extern int SL_sell=62; //---входные параметры по шортам
extern int Risk_sell=0;
//ooooooooooooooooooooooooooooooooooooooooooooooooo
//---- other parameters
static int prevtime=0;
int ticket=0;
int x=1;
//----------------------------------------------
int Magic_BUY =123;
int Magic_SELL =321;
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----
if(Digits == 5) x=10;
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
//oooooooooooooooooooooooooooooooooooooooooooooooooooo
if (Time[0] == prevtime) return(0);
prevtime = Time[0];
if (!IsTradeAllowed()) {
prevtime=Time[1]; MathSrand(TimeCurrent());Sleep(30000 + MathRand()); //--- формировка бара---
}
//ooooooooooooooooooooooooooooooooooooooooooooooooooooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
Trade( Magic_BUY, In_BUY,Ask,0,2, SL_buy, Risk_buy); //---торговля по лонгам
Trade(Magic_SELL,In_SELL,Bid,2,0, SL_sell,Risk_sell); //---торговля по шортам
//ooooooooooooooooooooooooooooooooooooooooooooooooooooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
return(0);//-----------выход из стартовой функции------------
}
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
void Trade(int mn,bool flag,double price,int period_1,int period_2,int sl,int Risk) {
int total=OrdersTotal();
for (int i = 0; i < total; i++) { OrderSelect(i, SELECT_BY_POS, MODE_TRADES);//---проход по ордерам--
if (OrderSymbol() == Symbol() && OrderMagicNumber() == mn) {
if(Open[period_2]>Open[period_1]) { //----условие закрытия ордера---------
OrderClose(OrderTicket(),OrderLots(),price,5*x); RefreshRates();
}
return(0);
}
}
//ooooooooooooooooooooooooooooooooooooooooooooooooooo
ticket = -1;
if ( flag &&
Open[period_1]>Open[period_2] && //----вход в рынок по условию---
OrdersTotal()<2 && //-----ограничения чемпионата------
AccountEquity()>200 &&
IsTradeAllowed()) {
if (mn<200) {
ticket= OrderSend(Symbol(), OP_BUY,lot(Risk_buy),Ask,5,Bid-x*sl*Point,0,DoubleToStr(mn,0),mn,0,Blue);
}
else {
ticket= OrderSend(Symbol(),OP_SELL,lot(Risk_sell),Bid,5,Ask+x*sl*Point,0,DoubleToStr(mn,0),mn,0, Red);
}
RefreshRates();
if ( ticket < 0) { Sleep(30000); prevtime = Time[1]; }
} //-- Exit ---
return(0); }
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
double lot(int R) { if (R<0)R=0; if (R>80)R=80; //------корректность ввода -------
double minlot = MarketInfo(Symbol(), MODE_MINLOT);
int o = MathAbs(MathLog(minlot) *0.4343) + 0.5;
double lot = minlot;
//ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
lot = NormalizeDouble(AccountFreeMargin() * 0.00001*R, o);//---
if (AccountFreeMargin() < lot * MarketInfo(Symbol(), MODE_MARGINREQUIRED)) {
lot = NormalizeDouble(AccountFreeMargin() / MarketInfo(Symbol(), MODE_MARGINREQUIRED), o);
}
//ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
if(lot < minlot) lot = minlot;
double maxlot =MarketInfo(Symbol(), MODE_MAXLOT);
if(lot > maxlot) lot = maxlot;
return(lot); }
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_end_film_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Veya 1 açık, 2 açık-1 kapalı, 3 açık-2 kapalı vb. prensibine göre çalışacak başka bir danışman yazmak mümkündür. Yardım çok ama çok gerekli!
Bana yardım et lütfen! Expert Advisor'da yeni bir sipariş açıldığında eskisinin kapanması için nasıl yapılır? Test cihazında iyi çalışıyor, ancak gerçekte, bir nedenden dolayı, yenisini açtığınızda eskisi gidiyor ????????? Programlamada nihayet sıfırlayabiliyorum (((
//ooooooooooooooooooooooooooooooooooooooooooooooooo
extern bool In_BUY=true;
extern int SL_buy=62; //---входные параметры по лонгам
extern int Risk_buy=0;
Yer değiştirmek
üzerinde
Bu aşamadaki amacım, şu veya bu işlevin nasıl çalıştığını ve bu özel durumda ArrayGetAsSeries işlevinin nasıl çalıştığını anlamaktır. ArraySetAsSeries işlevini set=true parametresiyle kullanabileceğinizi anlıyorum; bu, bir zaman serisi dizisinde olduğu gibi dizine eklemeyi zorlayacaktır. Ancak benim durumumda ArrayGetAsSeries işlevinin neden 0 döndürdüğünü anlamak istiyorum , ancak dışarıdan dizi bir zaman serisi gibi görünüyor (yani bir zaman serisi gibi indekslenmiş)
Kesinlikle çünkü sadece bir zaman serisi gibi GÖRÜNÜYOR.
Bu sadece senin kişisel görüşün. Ve orada 1, 2, 1.2, 2.1 sayılarını puanlayarak, 1927'de domuz eti zaman serisine götürüleceksiniz (sayı isteğe bağlıdır). Ancak bu, diziyi bir zaman serisi yapmaz - bunu ilgili işlevle açıkça belirtmeniz gerekir.