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
quanto è rilevante il trading su più Simboli e/o Timeframes all'interno di un Expert Advisor?
Attualmente sono seduto e penso - dovrei postare symbol_lib e il template di Expert Advisor, progettato proprio per questo scopo =)
e penso che non ci sia questo bisogno... Se faccio trading su diversi conti - dovrò comunque eseguire diversi terminali, e se faccio trading su uno solo - aprirò semplicemente diverse finestre. E ci sarebbe meno confusione, sembra...
Sarà interessante sentire le opinioni e gli argomenti per loro ;)
int CurPrice_p=Bid/Point; //текущая цена в пунктах int CurSLoss=OrderStopLoss( )/Point; //текущий стоплосс в пунктах int TS=40; //значение трейлингстопа в пунктах if(TS>=5) { int TStep=2; //минимальный шаг трейлинг стопа if(TStep<1) TStep=1; //проверка шага трейлинга { if(MathAbs(CurPrice_p-CurSLOss)>=TS+TStep) { if(CurPrice_p>CurSLOss) { double NewSLoss=(CurPrice_p-TS)*Point; изменить уровень стоплосс ордера на новый } if(CurPrice_p>CurSLOss) { NewSLoss=(CurPrice_p+TS)*Point; изменить уровень стоплосс ордера на новый } } } }questa è un'idea ... è più di un pensiero - è un'idea ))
Il giorno successivo esaminerò gli errori che sono stati raccolti dall'Expert Advisor e penserò ad implementare le funzioni di trading. Condividerò con voi la prossima settimana ;)
Quanto è rilevante fare trading su più sigilli e/o timeframe all'interno dello stesso Expert Advisor?
Come risultato del voto (1 contro (komposter), 0 a favore, il resto si è astenuto) ho deciso di non postare spazzatura di trading multisimbolo in questo thread =)
Se qualcuno è ancora interessato, scriva e condivida la libreria ;-|
Da usare:
1. Scrivi questo file con estensione mqh, Tracert.mqh nella cartella experts\include\
2. Aggiungere la linea #include <Tracert.mqh>
"http://*****************"
3. Inserire la funzione SetTrace() all'inizio del blocco start() ;
int start() { int ticket, total,totalExpert; //------------------------------------------------------ //per semplificare e accelerare il codice, salviamo i dati necessari // dell'indicatore in variabili temporanee SetTrace();4. Dopo l'esecuzione dell'EA, aprite il file e ottenete qualcosa del genere:
Il codice dell'utilità stessa:
//+------------------------------------------------------------------+ //| Tracert.mq4 | //| Rosh | //| http://forexsystems.ru/phpBB/index.php | //+------------------------------------------------------------------+ #property copyright "Rosh" #property link "http://forexsystems.ru/phpBB/index.php" //+------------------------------------------------------------------+ //| script program start function | //+------------------------------------------------------------------+ double tr_AOPLong,tr_AOPShort; double tr_LongLots,tr_ShortLots; int tr_CurrLongOrders,tr_CurrShortOrders; int tr_Total,tr_Counter; int tr_PrevLongOrders,tr_PrevShortOrders; int tr_CurrTotalOpenedOrders,tr_PrevTotalOpenedOrders; double tr_CurrBalance,tr_PrevCurrBalance; color tr_ProfitColor=Lime, tr_LossColor=DeepPink,tr_LongAOPColor=Blue,tr_ShortAOPColor=Red, tr_CurrCloseColor; int tr_CloseLabelArrow=108, tr_AOPLabelArrow=159; bool tr_CloseLong,tr_CloseShort; double tr_CloseLabelPrice; int tr_CloseLabelShift=20; int tr_CounterCloseLabel=0,tr_CounterAOPLabel=0; int tr_Bars; void SetTrace() { //---- if (IsTesting()&&(tr_Bars!=Bars)) { tr_CloseLong=false; tr_CloseShort=false; tr_AOPLong=0.0; tr_AOPShort=0.0; tr_LongLots=0.0; tr_ShortLots=0.0; tr_CloseLabelShift=iATR(NULL,0,50,1)*3.0/10.0/Point; if (tr_CurrBalance==0.0) { tr_CurrBalance=AccountBalance(); tr_PrevCurrBalance=AccountBalance(); } //----------------Проверка открытых позиций --------------------------- tr_CurrLongOrders=0; tr_CurrShortOrders=0; tr_CurrTotalOpenedOrders=0; tr_Total=OrdersTotal(); if (tr_Total>0)// есть открытые позиции { for (tr_Counter=0;tr_Counter<tr_Total;tr_Counter++)// подсчет открытых позиций { OrderSelect(tr_Counter, SELECT_BY_POS, MODE_TRADES); if (OrderType()==OP_BUY) { tr_CurrLongOrders++; tr_AOPLong=tr_AOPLong+OrderLots()*OrderOpenPrice(); tr_LongLots=tr_LongLots+OrderLots(); } if (OrderType()==OP_SELL) { tr_CurrShortOrders++; tr_AOPShort=tr_AOPShort+OrderLots()*OrderOpenPrice(); tr_ShortLots=tr_ShortLots+OrderLots(); } }// подсчет открытых позиций //--------------- усреднение --------------------- if (tr_CurrLongOrders>0) tr_AOPLong=tr_AOPLong/tr_LongLots; if (tr_CurrShortOrders>0)tr_AOPShort=tr_AOPShort/tr_ShortLots; //--------------- усреднение --------------------- if (tr_AOPLong>0.0) { ObjectCreate("AOP"+tr_CounterAOPLabel,OBJ_ARROW,0,Time[1],tr_AOPLong);// не совсем корректно, но пока пойдет ObjectSet("AOP"+tr_CounterAOPLabel,OBJPROP_ARROWCODE,tr_AOPLabelArrow); ObjectSet("AOP"+tr_CounterAOPLabel,OBJPROP_COLOR,tr_LongAOPColor); tr_CounterAOPLabel++; } if (tr_AOPShort>0.0) { ObjectCreate("AOP"+tr_CounterAOPLabel,OBJ_ARROW,0,Time[1],tr_AOPShort);// не совсем корректно, но пока пойдет ObjectSet("AOP"+tr_CounterAOPLabel,OBJPROP_ARROWCODE,tr_AOPLabelArrow); ObjectSet("AOP"+tr_CounterAOPLabel,OBJPROP_COLOR,tr_ShortAOPColor); tr_CounterAOPLabel++; } // Print("Long=",tr_CurrLongOrders," tr_AOPLong=",tr_AOPLong," *** Short=",tr_CurrShortOrders," tr_AOPShort=",tr_AOPShort); tr_CurrTotalOpenedOrders=tr_CurrLongOrders+tr_CurrShortOrders; if ((tr_CurrTotalOpenedOrders!=tr_PrevTotalOpenedOrders)||(tr_PrevLongOrders!=tr_CurrLongOrders)||(tr_PrevShortOrders!=tr_CurrShortOrders)) // изменилось колчиство ордеров в рынке { if (tr_PrevLongOrders>tr_CurrLongOrders) // изменилось число ордеров в Long { tr_CloseLong=true; tr_CloseLabelPrice=High[1]+tr_CloseLabelShift*Point; } if (tr_PrevShortOrders>tr_CurrShortOrders) // изменилось число ордеров в Short { tr_CloseShort=true; tr_CloseLabelPrice=Low[1]-tr_CloseLabelShift*Point; } tr_PrevLongOrders=tr_CurrLongOrders; tr_PrevShortOrders=tr_CurrShortOrders; tr_PrevTotalOpenedOrders=tr_CurrTotalOpenedOrders; } }// есть открытые позиции //---------------- Проверка изменения Баланса tr_CurrBalance=AccountBalance(); if (tr_CurrBalance!=tr_PrevCurrBalance)// проверка изменения Balance { if (tr_CurrBalance-tr_PrevCurrBalance>0.0) tr_CurrCloseColor=tr_ProfitColor; else tr_CurrCloseColor=tr_LossColor; tr_PrevCurrBalance=tr_CurrBalance; //------------------ установка Метки закрытия -------------------- ObjectCreate("Close"+tr_CounterCloseLabel,OBJ_ARROW,0,Time[1],tr_CloseLabelPrice); ObjectSet("Close"+tr_CounterCloseLabel,OBJPROP_ARROWCODE,tr_CloseLabelArrow); ObjectSet("Close"+tr_CounterCloseLabel,OBJPROP_COLOR,tr_CurrCloseColor); tr_CounterCloseLabel++; //------------------ установка Метки закрытия -------------------- }// проверка изменения Balance }//(IsTesting()) //---- tr_Bars=Bars; return(0); } //+------------------------------------------------------------------+Usare lo stesso. Basta cambiare i vecchi nomi nelle linee degli inludi con quelli nuovi.
si trovano all'indirizzo http://forum.viac.ru/viewtopic.php?t=2973
Potresti postare tutti questi file, sia gli ultimi che i precedenti, da qualche parte su viac o alpari o forexitems o finlists - in generale, dove si possono allegare i file. Sarebbe anche più facile da trovare. Grazie in anticipo.
Potresti per favore mettere tutti questi file e quelli recenti e precedenti da qualche parte su viac o alpari o forexitems o finlist - in generale, dove si possono allegare i file. Sarebbe anche più facile da trovare. Grazie in anticipo.
http://forum.viac.ru/viewtopic.php?t=2973
Sposterò le descrizioni con le istruzioni più tardi...
velocità di test aumentata di oltre 10 volte
Ci sono molti cambiamenti. E un'enorme quantità.
La tolleranza agli errori è ad un livello completamente nuovo, le informazioni sono più complete, l'interfaccia è più amichevole ;) ...
In generale, possiamo dire che è una libreria assolutamente nuova =)
Sentitevi liberi di usarlo ;)