Tutte le domande dei nuovi arrivati su MQL4 e MQL5, aiuto e discussione su algoritmi e codici - pagina 1614
Ti stai perdendo delle opportunità di trading:
- App di trading gratuite
- Oltre 8.000 segnali per il copy trading
- Notizie economiche per esplorare i mercati finanziari
Registrazione
Accedi
Accetti la politica del sito e le condizioni d’uso
Se non hai un account, registrati
solo questa linea solleva la domanda
-50 extra e un arrayÈ per disegnare sopra/sotto lo "0"
Ma potete farne a meno, mi serve il succo, come usare le maniglie.
Lo consiglio vivamente:
Altrimenti si ottiene un oops)).
In più, riducetelo a un intero subito dopo la divisione. Altrimenti il conteggio binario può fare un sacco di cose).
Questo è per disegnare sopra/sotto lo "0"
ma puoi farne a meno, ho bisogno di sapere come usare le maniglie.
un handle è un puntatore al file dell'indicatore, di solito viene creato in OnInit()
più avanti nel codice
Handle è un puntatore al file dell'indicatore, è creato in OnInit() di solito
più avanti nel codice
Grazie, ma sembra che l'aiuto e purtroppo non è chiaro per me(
Ecco perché ho chiesto di tradurre il mio codice in mql5 per capire la logica del lavoro
Io lo faccio in questo modo
Ma ho la sensazione che qualcosa sia sbagliato e iMAOnArray non è menzionato nell'aiuto.
Buon pomeriggio.
Non riesco a risolvere il problema del looping di Martin,
Non riesco a risolvere il problema con il looping del martin. si disconnette dopo l'esecuzione :(n>=OrdersClose)- e quindi il martin non parte fino a quando non si verifica un trade redditizio,
Ho bisogno di averereturn(dLots) dopo (n>=OrdersClose) e Martin ricomincerà se il prossimo trade è nuovamente perdente.
Potresti per favore consigliarmi come fare?
Buona giornata a tutti!!!
Per favore ditemi per favore nel codice advisor griglia prescritto la visualizzazione del prezzo medio sul grafico. Sarei a posto, ma la linea non è correttamente cancellata dopo la chiusura della griglia, cioè il prezzo medio non lo è. Per favore, ditemi cosa ho fatto di sbagliato. Ecco il codice e l'immagine.
//+----------------------------------------------------------------------------+
//| Modificare gli ordini di gruppo |
//+----------------------------------------------------------------------------+
void ModifyOrders(int otype)
{
double avg_price, AveragePriceBuy, AveragePriceSell, order_lots = 0;
price = 0;
for(int i = OrdersTotal()-1; i>=0; i--)
{
if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
{
if(OrderSymbol() == Symbol() && OrderMagicNumber() == Magic && OrderType() == otype)
{
price += OrderOpenPrice() * OrderLots();
order_lots += OrderLots() ;
}
}
}
avg_price = NormalizeDouble(price / order_lots, Digits);
AveragePriceBuy = NormalizeDouble(avg_price + Spread, Digits);
AveragePriceSell = NormalizeDouble(avg_price - Spread, Digits);
{
ObjectDelete(0, "AveragePriceLine");
ObjectCreate("AveragePriceLine" ,OBJ_HLINE, 0, 0 ,AveragePriceBuy);
ObjectCreate("AveragePriceLine" ,OBJ_HLINE, 0, 0 ,AveragePriceSell);
ObjectSet("AveragePriceLine",OBJPROP_COLOR,Blue);
}
if ((otype == OP_BUY) && (Drawdown <= DrawdownClosingTakeprofitZero))
tp = NormalizeDouble (AveragePriceBuy + TakeProfitGroupOrder*Point, Digits);
if ((otype == OP_SELL) && (Drawdown <= DrawdownClosingTakeprofitZero))
tp = NormalizeDouble (AveragePriceSell - TakeProfitGroupOrder*Point, Digits);
se ((otype == OP_BUY) && (Drawdown > DrawdownClosingTakeprofitZero))
tp = NormalizeDouble (AveragePriceBuy, Digits);
se ((otype == OP_SELL) &/or& (Drawdown > DrawdownClosingTakeprofitZero))
tp = NormalizeDouble (AveragePriceSell, Digits);
for(int i = OrdersTotal()-1; i>=0; i--)
{
if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
{
if(OrderSymbol() == Symbol() && OrderMagicNumber() == Magic && OrderType() == otype)
{
if(OrderModify(OrderTicket(), OrderOpenPrice(), 0, tp, 0))
Print("Ordini modificati con successo!");
else Print("Error modifying orders!");
}
}
}
}
Buona giornata a tutti!!!
Per favore ditemi per favore nel codice advisor griglia prescritto la visualizzazione del prezzo medio sul grafico. Sarei a posto, ma la linea non è correttamente cancellata dopo la chiusura della griglia, cioè il prezzo medio non lo è. Per favore, ditemi cosa ho fatto di sbagliato. Ecco il codice e l'immagine.
Prova così
O meglio prescrivere,
se non ci sono ordini di vendita aperti, cancella la linea di vendita
lo stesso per il bai
Buona sera, come si fa a resettare lo stato di un pulsante grafico quando si clicca, in modo che non sia sempre premuto finché non si clicca di nuovo?