Forumu kirletmemek için herhangi bir acemi sorusu. Profesyonel, kaçırmayın. Sensiz, hiçbir yerde - 6. - sayfa 554
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
splxgf : - Çok teşekkür ederim! Her şey saat gibi çalışıyor!
İşte Igor Kim'in yüzdeler için pip yerine " splxgf :" ile yeniden çalışılan başabaş kodu:
//+------------------------------------------- ------------------------------+
//| Yazar : Kim Igor V. namı diğer KimIV, http://www.kimiv.ru |
//+------------------------------------------- ------------------------------+
//| Sürüm : 23/04/2009 |
//| Açıklama : Durdurma düzeyini başa baş düzeyine aktarma |
//+------------------------------------------- ------------------------------+
//| Seçenekler: |
//| sy - enstrüman adı ("" - herhangi bir sembol, |
//| NULL - geçerli karakter) |
//| operasyon - operasyon ( -1 - herhangi bir pozisyon) |
//| mn - MagicNumber ( -1 - herhangi bir büyü) |
//+------------------------------------------- ------------------------------+
void MovingInWL(dize sy=NULL, int op=-1, int mn=-1) {
double po, pp, PercentStep,MoveStoplossLevel,StoplossLevel;
int i, k=SiparişToplam();
if (sy=="0") sy=Symbol();
for (i=0; i<k; i++) {
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
if ((OrderSymbol()==sy || sy=="") && (op<0 || OrderType()==op)) {
if (mn<0 || OrderMagicNumber()==dk) {
po=MarketInfo(OrderSymbol(), MODE_POINT);
if (OrderType()==OP_BUY) {
PercentStep=(OrderTakeProfit()-OrderOpenPrice())/po/( 138 - 23 );
MoveStoplossLevel = OrderOpenPrice() + PercentStep*( 76 - 23 );
StoplossLevel = OrderOpenPrice() + PercentStep*( 51 - 23 );
if (OrderStopLoss()-OrderOpenPrice()<StoplossLevel*po) {
pp=MarketInfo(OrderSymbol(), MODE_BID);
if (pp-OrderOpenPrice()>MoveStoplossLevel*po) {
ModifyOrder(-1, OrderOpenPrice()+StoplossLevel*po, -1);
}
}
}
if (OrderType()==OP_SELL) {
PercentStep=(OrderTakeProfit()-OrderOpenPrice())/po/(138-23);
MoveStoplossLevel = OrderOpenPrice() - PercentStep*(76-23);
StoplossLevel = OrderOpenPrice() - PercentStep*(51-23);
if (OrderStopLoss()==0 || OrderOpenPrice()-OrderStopLoss()<StoplossLevel*po) {
pp=MarketInfo(OrderSymbol(), MODE_ASK);
if (OrderOpenPrice()-pp>MoveStoplossLevel*po) {
ModifyOrder(-1, OrderOpenPrice()-StoplossLevel*po, -1);
}
}
}
}
}
}
}
}
//+------------------------------------------- ------------------------------+
Sayılar:
138 , % Fibonacci'de kar al
23 , % Fibonacci cinsinden emir açılış fiyatıdır .
Fibonacci ızgarasının % 76'sı , buna ulaşıldığında fiyatın zararı durdurmayı Fibonacci ızgarasının % 51'ine taşıyacaktır .
e-MovingInWL2 Uzman Danışmanından işlev.
{
Trailing();
double Line11=iCustom(Symbol(), 0, "TDI Red Green", RSI_Period, RSI_Price, Volatility_Band, RSI_Price_Line, RSI_Price_Type, Trade_Signal_Line, Trade_Signal_Type, 4, 1);
double Line12=iCustom(Symbol(), 0, "TDI Red Green", RSI_Period, RSI_Price, Volatility_Band, RSI_Price_Line, RSI_Price_Type, Trade_Signal_Line, Trade_Signal_Type, 4, 2);
double Line21=iCustom(Symbol(), 0, "TDI Red Green", RSI_Period, RSI_Price, Volatility_Band, RSI_Price_Line, RSI_Price_Type, Trade_Signal_Line, Trade_Signal_Type, 5, 1);
if (timeprev == Time[0]) return(0);
timeprev = Time[0];
ma0=iMA(NULL,0,10,0,MODE_SMA,PRICE_CLOSE,1);
ma1=iMA(NULL,0,200,0,MODE_SMA,PRICE_CLOSE,1);
ma2=iMA(NULL,0,50,0,MODE_SMA,PRICE_CLOSE,1);
ma3=iMA(NULL,0,800,0,MODE_SMA,PRICE_CLOSE,1);
if (CountBuy()>5 && Volume[0]==1 && Ask > ma0 && Ask > ma1 && Ask > ma3)
{
if (Line11>Level1&&Line12<Level1&&Line11>Line12)
OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, Ask-sl*Point, Ask+tp*Point, comment, Magic, 0, Blue);
}
if (CountSell()>5 && Volume[0]==1 && Bid < ma0 && Bid < ma1 && Ask < ma3)
{
if (Line11>Level2&&Line12>Level1&&Line11>Line12)
OrderSend(Symbol(), OP_SELL, Lots, Bid, Slippage, Ask+sl*Point,Ask-tp*Point, comment, Magic, 0, Red);
}
return(0);
}
Lütfen TDI Kırmızı Yeşil göstergesini kullanarak siparişleri açma sinyali içeren kodda bir hata bulmama yardım edin.
Test cihazı, fırsatları açmaz veya yalnızca birini açar. Herhangi bir hata bildirmez.
Tampon göstergesi doğru şekilde belirtildi.
Sadece birkaç günlüğüne mql4 dilini öğreniyorum, acemi)))
Yardımın için şimdiden teşekkürler!!!içindeki N parametresi değişken bir değerdir; bu, değiştiğinde, kodu her seferinde yeniden yapmanız, ona "if" koşullarını (ilgili dizinin altında) ekleyerek (veya kaldırarak) yapmanız gerektiği anlamına gelir.
Soru - bir şekilde yalnızca bir "if" kullanmak, ancak dizi adlarında (veya başka bir şekilde) "k" değişkenini kullanmak mümkün mü? Onlar. ARRAY_{k} gibi bir şey. Dizileri Terminal değişkenleriyle değiştirebileceğinizi biliyorum, ancak bu zaten aşırı bir durum. Diziler için benzer bir çözüm var mı?
Böyle bir ikilemle karşılaştım - diyelim ki bir for döngüsü var:
içindeki N parametresi değişken bir değerdir; bu, değiştiğinde, kodu her seferinde yeniden yapmanız, ona "if" koşullarını (ilgili dizinin altında) ekleyerek (veya kaldırarak) yapmanız gerektiği anlamına gelir.
Soru - bir şekilde yalnızca bir "if" kullanmak, ancak dizi adlarında (veya başka bir şekilde) "k" değişkenini kullanmak mümkün mü? Onlar. ARRAY_{k} gibi bir şey. Dizileri Terminal değişkenleriyle değiştirebileceğinizi biliyorum, ancak bu zaten aşırı bir durum. Diziler için benzer bir çözüm var mı?
Şuna benziyorsa, şunları yapabilirsiniz:
Şuna benziyorsa, şunları yapabilirsiniz:
Ne demek istediğini kelimelerle anlatabilir misin?
Ne demek istediğini kelimelerle anlatabilir misin?
Üzgünüm, dikkatim dağıldı.
Dizi dizini, tanımlayıcının bir parçası yapılır.
İşte basit bir kod.
Bunu HER ellinci mumda istiyorum
program dikey bir çizgi sergiledi.
SORUN
Program YALNIZCA BİRİNCİ MUMDA bir dikey çizgi gösterir (50'nin katları)
Teşekkür ederim.
Dizi dizini, tanımlayıcının bir parçası yapılır.
Anladığım kadarıyla çözümünüz benim durumumda işe yaramayacak, ancak bana kontrol etmeye değer bir fikir verdi. Teşekkür ederim!
İşte basit bir kod.
Bunu HER ellinci mumda istiyorum
program dikey bir çizgi sergiledi.
SORUN
Program YALNIZCA BİRİNCİ MUMDA bir dikey çizgi gösterir (50'nin katları)
Teşekkür ederim.
Aynı ada sahip birkaç nesne oluşturmaya çalışıyorsunuz, ancak bu mümkün değil. Nesnelerin adı benzersiz olmalıdır, örneğin zaman:
Bu ilk. İkincisi: döngü nerede? Senaryo mumları nasıl sayacak?