I test several Expert Advisors. By their IDs in "history" and "log" I analyse their work. This EA has no ID. I do not know programming, so please help me. How to add ID to the properties ?
Files:
2em_ID_1d6vezvn.png
137 kb
Александр:
I test several Expert Advisors. By their IDs in "history" and "log" I analyse their performance. This EA has no ID. I do not know programming, so please help me. How to add ID to the properties ?
I test several Expert Advisors. By their IDs in "history" and "log" I analyse their performance. This EA has no ID. I do not know programming, so please help me. How to add ID to the properties ?
See the example in the Wing rotation code:
1. add input parameter'Magic number'
input bool InpPrintLog = false; // Print log input ulong InpMagic = 200; // Magic number //--- double m_stop_loss = 0.0; // Stop Loss -> double
2. set this ID in OnInit
//+------------------------------------------------------------------+ //| Expert initialisation function| //+------------------------------------------------------------------+ int OnInit() { //--- *** //--- m_trade.SetExpertMagicNumber(InpMagic); m_trade.SetMarginMode(); m_trade.SetTypeFillingBySymbol(m_symbol.Name()); m_trade.SetDeviationInPoints(InpDeviation); //--- tuning for 3 or 5 digits
3. I need to add a filter - so that the Expert Advisor works only with its ID
//+------------------------------------------------------------------+ //|| //+------------------------------------------------------------------+ bool DeleteLimitOrder(int type) { bool err=false; for(int i=OrdersTotal()-1; i>=0;i--) { if(m_order.SelectByIndex(i) if(m_order.Magic()==InpMagic) {
//+------------------------------------------------------------------+ //|| //+------------------------------------------------------------------+ int ChLimitOrder(int type) { for(int i=OrdersTotal()-1; i>=0; i--) { if(m_order.Magic()==InpMagic) {
//+------------------------------------------------------------------+ //|| //+------------------------------------------------------------------+ int ChPositions(int type) { for(int i=PositionsTotal()-1; i>=0; i--) { if(m_position.SelectByIndex(i)) if(m_position.Magic()==InpMagic) {
//+------------------------------------------------------------------+ //|| //+------------------------------------------------------------------+ int Trailing() {// function description http://fxnow.ru/blog/programming_mql4/1.html bool err=false; if(ExtTrailingStop<=0) return(0); for(int i=PositionsTotal()-1; i>=0; i--) { if(m_position.SelectByIndex(i)) if(m_position.SelectByIndex()==InpMagic) {
//+------------------------------------------------------------------+ //|| //+------------------------------------------------------------------+ int BBU() {// function description http://fxnow.ru/blog/programming_mql4/2.html bool err=false; if(InpBBUSize<=0) return(0); for(int i=PositionsTotal()-1; i>=0; i--) { if(m_position.SelectByIndex()==InpMagic) {
Wing rotation
- www.mql5.com
Отловить момент, когда будут два сигнала: пересечение двух iMA (Movinag Average, MA) и пересечение нуля основной линией индикатора iMACD (Moving Average Convergence/Divergence, MACD) На баре может быть только одна сделка 'вход в рынок' (это внутренний параметр, он не вынесен во входные параметры и это не имеет отношения к параметру ' Only one...
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Fibo iSAR:
The Expert Advisor uses Fibo levels and iSAR indicator - Parabolic Stop and Reverse system. Trading is performed using BuyLimit and SellLimit orders.
Author: Vladimir Karputov