어드바이저를 무작위로 모으는 방법 - 페이지 48

 
Alexsandr San :

무슨 일이 있었던 것 같습니다 - 혼란스럽지 않게 하려고 노력했습니다. 관심 있는 사람이 있으면 물어보십시오. 함께 알아낼 것입니다.

명령 메서드를 찾아야 합니다. 여전히 제대로 작동하도록 설정하는 방법을 찾고 있습니다.

 //+------------------------------------------------------------------+
//| Enum Lor or Risk                                                 |
//+------------------------------------------------------------------+
enum ENUM_TRADE_COMMAND
  {
   Line_Line= 0 ,       // Line
   Line_buy= 1 ,       // Line+Open Buy
   Line_sell= 2 ,       // Line+Open Sell
   close_buys= 3 ,     // Close All Buy's
   close_sells= 4 ,     // Close All Sell's
   close_all= 5 ,       // Close All Buy's and Sell's
   open_buy= 6 ,       // Open Buy
   open_sell= 7 ,       // Open Sell
   open_buy_sell= 8 ,   // Open Buy and Sell
  };
//+------------------------------------------------------------------+


여기에서 작업이 수행되며 논리를 설정해야 합니다.

   if (main[ 1 ]>signal[ 1 ])
     {
       switch (InpTradeCommandY)
        {
         case Line_Line:
            ExtNeedLine= true ;
             if (Obj_line())
               break ;
         case Line_buy:
            ExtNeedOpenBuy= true ;
             if (LongObjOpened())
               ExtNeedLine= true ;
             if (Obj_line())
               break ;
         case Line_sell:
            ExtNeedOpenSell= true ;
             if (ShortObjOpened())
               ExtNeedLine= true ;
             if (Obj_line())
               break ;
         case   close_buys:
            ExtNeedCloseBuy= true ;
             if (LongObjClosed())
               break ;
         case   close_sells:
            ExtNeedCloseSell= true ;
             if (ShortObjClosed())
               break ;
         case close_all:
            ExtNeedCloseAll= true ;
             if (LongShortObjClosed())
               break ;
         case open_buy:
            ExtNeedOpenBuy= true ;
             if (LongObjOpened())
               break ;
         case open_sell:
            ExtNeedOpenSell= true ;
             if (ShortObjOpened())
               break ;
         default :
            ExtNeedOpenBuySell= true ;
             if (LongShortObjOpened())
               break ;
        }
       PlaySound ( "ok.wav" );
     }
   if (main[ 1 ]<signal[ 1 ])
     {
       switch (InpTradeCommandU)
        {
         case Line_Line:
            ExtNeedLine= true ;
             if (Obj_line())
               break ;
         case Line_buy:
            ExtNeedOpenBuy= true ;
             if (LongObjOpened())
               ExtNeedLine= true ;
             if (Obj_line())
               break ;
         case Line_sell:
            ExtNeedOpenSell= true ;
             if (ShortObjOpened())
               ExtNeedLine= true ;
             if (Obj_line())
               break ;
         case   close_buys:
            ExtNeedCloseBuy= true ;
             if (LongObjClosed())
               break ;
         case   close_sells:
            ExtNeedCloseSell= true ;
             if (ShortObjClosed())
               break ;
         case close_all:
            ExtNeedCloseAll= true ;
             if (LongShortObjClosed())
               break ;
         case open_buy:
            ExtNeedOpenBuy= true ;
             if (LongObjOpened())
               break ;
         case open_sell:
            ExtNeedOpenSell= true ;
             if (ShortObjOpened())
               break ;
         default :
            ExtNeedOpenBuySell= true ;
             if (LongShortObjOpened())
               break ;
        }
       PlaySound ( "ok.wav" );
     }
//---
 

나는 그것을 이해할 수 없다 - 여기, 두 개의 수평선, 가격이 첫 번째 것에 닿아 떠나고, 여기에 두 번째 수평선이 무엇이든 남아 있습니다.

- 찌르다, 찌르다 - 방법이 아니라! 둘 다 제거됩니다.

및 이름, 이 행은 다릅니다

하나

 input string    t0= "----- Trailing Line: 1   -----" ;               //
input string    InpObjUpName                 = "TOP" ;             // Obj: TOP (Horizontal Line)
input int       InpStep1                     = 20 ;                 // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InpTradeCommand    = close_sells;       // Obj:  command:
input string    InpObjDownName               = "LOWER" ;           // Obj: LOWER (Horizontal Line)
input int       InpStep2                     = 20 ;                 // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InTradeCommand     = close_buys;         // Obj:  command:
input ushort    InpObjTrailingStop           = 30 ;                 // Obj: Trailing Stop (distance from price to object, in pips)
input ushort    InpObjTrailingStep           = 5 ;                 // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)

2

 input string    t2= "----- Trailing Line: 2   -----" ;               //
input string    InpObjUpNameG                = "TOP G" ;           // Obj: TOP (Horizontal Line)
input int       InpStep3                     = 30 ;                 // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InpTradeCommandG   = close_sells;       // Obj:  command:
input string    InpObjDownNameG              = "LOWER G" ;         // Obj: LOWER (Horizontal Line)
input int       InpStep4                     = 30 ;                 // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InTradeCommandG    = close_buys;         // Obj:  command:
input ushort    InpObjTrailingStopG          = 50 ;                 // Obj: Trailing Stop (distance from price to object, in pips)
input ushort    InpObjTrailingStepG          = 5 ;                 // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)

명령을 다르게 처방해야 할 수도 있습니다.

                           ObjectsDeleteAll ( 0 ,InpObjUpName);

스냅 사진

파일:
 
Alexsandr San :

나는 그것을 이해할 수 없다 - 여기, 두 개의 수평선, 가격이 첫 번째 것에 닿아 떠나고, 여기에 두 번째 수평선이 무엇이든 남아 있습니다.

- 찌르다, 찌르다 - 방법이 아니라! 둘 다 제거됩니다.

및 이름, 이 행은 다릅니다

하나

2

명령을 다르게 처방해야 할 수도 있습니다.


수동으로 수평선 을 그리고 "TOP"라는 이름을 지정하고 로봇은 같은 이름으로 그립니다. 어떻게 그럴 수 있습니까?

같은 이름의 가로줄 2개

스냅 사진

수동으로 수평 설정 - 로봇이 작동하지 않았지만 로봇이 설정한 것은 작동하고 이름이 "TOP" 인 두 수평을 모두 삭제했습니다.

 
Alexsandr San :

나는 그것을 이해할 수 없다 - 여기, 두 개의 수평선, 가격이 첫 번째 것에 닿아 떠나고, 여기에 두 번째 수평선이 무엇이든 남아 있습니다.

- 찌르다, 찌르다 - 방법이 아니라! 둘 다 제거됩니다.

및 이름, 이 행은 다릅니다

하나

2

명령을 다르게 처방해야 할 수도 있습니다.


나는 그것을 알아 냈다 - 이름이 매우 유사하여 "TOP"과 "TOP G" 가 삭제 된 이유

설정에서 다른 이름을 지정했습니다. 이제 원래대로 삭제됩니다.

스냅샷2

 
Alexsandr San :

나는 그것을 알아 냈다 - 이름이 매우 유사하여 "TOP"과 "TOP G" 가 삭제 된 이유

설정에서 다른 이름을 지정했습니다. 이제 원래대로 삭제됩니다.


예 ! 와우, 모든 것이 작동했습니다! - 개체의 이름이 밝혀졌으므로 설정해야 하는 개체의 이름이 매우 유사하지 않도록 해야 합니다.

스냅샷3

 

Expert는 하나의 Expert에서 모든 명령을 실행합니다.

설정-

 //+------------------------------------------------------------------+
//| Enum Lor or Risk                                                 |
//+------------------------------------------------------------------+
enum ENUM_TRADE_COMMAND
  {
   Line1_Line1= 0 ,     // Line: LOWER
   Line2_Line2= 1 ,     // Line: TOP
   Line_Line= 2 ,       // Line: LOWER+Line: TOP
   close_buys= 3 ,     // Close All Buy's
   close_sells= 4 ,     // Close All Sell's
   close_all= 5 ,       // Close All Buy's and Sell's
   open_buy= 6 ,       // Open Buy
   open_sell= 7 ,       // Open Sell
   open_buy_sell= 8 ,   // Open Buy and Sell
  };
//+------------------------------------------------------------------+
input string    t= "-----  Parameters         -----" ;               //
input string    Template                     = "ADX" ;             // Имя шаблона(without '.tpl')
input double    TargetProfit                 = 999999.99 ;         // Цель Баланса(Ваш Баланс + сумма)
input uint      maxLimits                    = 1 ;                 // Кол-во Позиции Открыть в одну сторону
input double    InpLots                      = 0.01 ;               // Lots
input int       InpTakeProfit                = 100 ;               // Take Profit ("0"-No. 5<100)
input string    t0= "----- Trailing Line: 1   -----" ;               //
input string    InpObjUpName                 = "TOP" ;             // Obj: TOP (Horizontal Line)
input int       InpStep1                     = 20 ;                 // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InpTradeCommand    = open_sell;         // Obj:  command:
input string    InpObjDownName               = "LOWER" ;           // Obj: LOWER (Horizontal Line)
input int       InpStep2                     = 20 ;                 // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InTradeCommand     = open_buy;           // Obj:  command:
input ushort    InpObjTrailingStop           = 30 ;                 // Obj: Trailing Stop (distance from price to object, in pips)
input ushort    InpObjTrailingStep           = 5 ;                 // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)
input string    t1= "----- Line name: 1       -----" ;               //
input string    InpNameR                     = "LineR" ;           // Line name (Horizontal Line or Trend Line)
input ENUM_TRADE_COMMAND InpTradeCommandR   = open_buy;           // Trade command:
input string    t2= "----- Trailing Line: 2   -----" ;               //
input string    InpObjUpNameG                = "POT" ;             // Obj: TOP (Horizontal Line)
input int       InpStep3                     = 30 ;                 // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InpTradeCommandG   = close_sells;       // Obj:  command:
input string    InpObjDownNameG              = "REWOL" ;           // Obj: LOWER (Horizontal Line)
input int       InpStep4                     = 30 ;                 // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InTradeCommandG    = close_buys;         // Obj:  command:
input ushort    InpObjTrailingStopG          = 50 ;                 // Obj: Trailing Stop (distance from price to object, in pips)
input ushort    InpObjTrailingStepG          = 5 ;                 // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)
input string    t3= "----- Line name: 2       -----" ;               //
input string    InpNameS                     = "LineS" ;           // Line name (Horizontal Line or Trend Line)
input ENUM_TRADE_COMMAND InpTradeCommandS   = open_sell;         // Trade command:
input string    t4= "----- Indicators: SELL   -----" ;               //
input string    short_name                   = "LeMan_BrainTrend1Sig" ; // Name Indicators "SELL"
input bool      InpIndicators                = true ;               // Indicators: Start (true)
input ENUM_TRADE_COMMAND InpTradeCommandY   = Line2_Line2;       // Trade command: (BuyBuffer Indicators)
input ENUM_TRADE_COMMAND InpTradeCommandU   = Line1_Line1;       // Trade command: (SellBuffer Indicators)
input string    t5= "----- Indicators: BUY    -----" ;               //
input string    short_name1                  = "LeMan_BrainTrend1Sig" ; // Name Indicators "BUY"
input bool      InpIndicators1               = false ;             // Indicators: Start (true)
input ENUM_TRADE_COMMAND InpTradeCommandY1  = close_buys;         // Trade command: (BuyBuffer Indicators)
input ENUM_TRADE_COMMAND InpTradeCommandU1  = Line1_Line1;       // Trade command: (SellBuffer Indicators)
input string    t6= "----- Button:            -----" ;               //
input ENUM_TRADE_COMMAND InpTradeCommandBut = Line1_Line1;       // Obj(BUY):  command:Button: BUY
input ENUM_TRADE_COMMAND InTradeCommandBut  = Line2_Line2;       // Obj(SELL):  command:Button: SELL
input int       TrailingStop_STOP_LEVEL      = 36 ;                 // Button: Trailing Stop LEVEL

스냅샷2

테스터에서 오류를 찾았습니다. 동시에 기본 결과

스냅 사진

 

더 많은 명령을 추가했습니다

 //+------------------------------------------------------------------+
//| Enum Lor or Risk                                                 |
//+------------------------------------------------------------------+
enum ENUM_TRADE_COMMAND
  {
   Line1_Line1= 0 ,     // Line: LOWER
   Line2_Line2= 1 ,     // Line: TOP
   Line_Line= 2 ,       // Line: LOWER+Line: TOP
   Line1_buys= 3 ,     // Line: LOWER+Buy's
   Line2_sells= 4 ,     // Line: TOP+Sell's
   close_buys= 5 ,     // Close All Buy's
   close_sells= 6 ,     // Close All Sell's
   close_all= 7 ,       // Close All Buy's and Sell's
   open_buy= 8 ,       // Open Buy
   open_sell= 9 ,       // Open Sell
   open_buy_sell= 10 , // Open Buy and Sell
  };
//+------------------------------------------------------------------+

여기에 추가됩니다

   Line1_buys= 3 ,     // Line: LOWER+Buy's
   Line2_sells= 4 ,     // Line: TOP+Sell's
파일:
 

전문가 유틸리티 -

지침은 기억해야 할 가장 중요한 사항입니다.

 input string    t0= "----- Trailing Line: 1   -----" ;               //
input string    InpObjUpName                 = "TOP" ;             // Obj: TOP (Horizontal Line)
input int       InpStep1                     = 25 ;                 // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InpTradeCommand    = open_sell;         // Obj:  command:
input string    InpObjDownName               = "LOWER" ;           // Obj: LOWER (Horizontal Line)
input int       InpStep2                     = 25 ;                 // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InTradeCommand     = close_buys;         // Obj:  command:
input ushort    InpObjTrailingStop           = 0 ;                 // Obj: Trailing Stop (distance from price to object, in pips)
input ushort    InpObjTrailingStep           = 5 ;                 // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)
input string    t1= "----- Trailing Line: 2   -----" ;               //
input string    InpObjUpNameG                = "POT" ;             // Obj: TOP (Horizontal Line)
input int       InpStep3                     = 0 ;                 // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InpTradeCommandG   = close_sells;       // Obj:  command:
input string    InpObjDownNameG              = "REWOL" ;           // Obj: LOWER (Horizontal Line)
input int       InpStep4                     = 0 ;                 // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InTradeCommandG    = close_buys;         // Obj:  command:
input ushort    InpObjTrailingStopG          = 0 ;                 // Obj: Trailing Stop (distance from price to object, in pips)
input ushort    InpObjTrailingStepG          = 5 ;                 // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)

선은 설정하면 그려지며 ( Grid step, points("0" -> false) ) 또한 트롤링됩니다(0이면 그렇지 않음).

----------------------------------------

표시기의 또 다른 신호 - 내가 첨부한 이 표시기를 다운로드할 필요가 없으며 직접 선택할 수 있습니다.

 input string    t2= "----- Indicators: SELL   -----" ;               //
input string    short_name                   = "LeMan_BrainTrend1Sig" ; // Name Indicators "SELL"
input bool      InpIndicators                = false ;             // Indicators: Start (true)
input ENUM_TRADE_COMMAND InpTradeCommandY   = open_sell;         // Trade command: (BuyBuffer Indicators)
input ENUM_TRADE_COMMAND InpTradeCommandU   = close_sells;       // Trade command: (SellBuffer Indicators)
input string    t3= "----- Indicators: BUY    -----" ;               //
input string    short_name1                  = "LeMan_BrainTrend1Sig" ; // Name Indicators "BUY"
input bool      InpIndicators1               = false ;             // Indicators: Start (true)
input ENUM_TRADE_COMMAND InpTradeCommandY1  = close_buys;         // Trade command: (BuyBuffer Indicators)
input ENUM_TRADE_COMMAND InpTradeCommandU1  = open_buy;           // Trade command: (SellBuffer Indicators)
 
Alexsandr San :

전문가 유틸리티 -

지침은 기억해야 할 가장 중요한 사항입니다.

선은 설정하면 그려지며 ( Grid step, points("0" -> false) ) 또한 트롤링됩니다(0이면 그렇지 않음).

----------------------------------------

표시기의 또 다른 신호 - 내가 첨부한 이 표시기를 다운로드할 필요가 없으며 직접 선택할 수 있습니다.


설정 중 하나

스냅샷3

스냅 사진

스냅샷2

.set 파일의 설정

파일:
demo.set  4 kb
 
#property version      "1.001"

몇 가지 명령을 추가했습니다

 //+------------------------------------------------------------------+
//| ENUM_TRADE_COMMAND                                                 |
//+------------------------------------------------------------------+
enum ENUM_TRADE_COMMAND
  {
   Turn_Off= 0 ,       // TURN OFF
   Line1_Line1= 1 ,     // Line: LOWER
   Line2_Line2= 2 ,     // Line: TOP
   Line_Line= 3 ,       // Line: LOWER+Line: TOP
   Line1_buys= 4 ,     // Line: LOWER+Buy's
   Line2_sells= 5 ,     // Line: TOP+Sell's
   sells_Line1= 6 ,     // Line: LOWER+Sell's
   buys_Line2= 7 ,     // Line: TOP+Buy's
   close_buys= 8 ,     // Close All Buy's
   close_sells= 9 ,     // Close All Sell's
   close_all= 10 ,     // Close All Buy's and Sell's
   open_buy= 11 ,       // Open Buy
   open_sell= 12 ,     // Open Sell
   close_open_b= 13 ,   // Close Sell+Open Buy
   close_open_s= 14 ,   // Close Buy+Open Sell
   open_buy_sell= 15 , // Open Buy and Sell
  };
//+------------------------------------------------------------------+
파일: