撰写一份有效的顾问报告 - 页 27 1...202122232425262728293031323334...41 新评论 Renat Akhtyamov 2021.11.20 19:24 #261 darirunu1 #:设想一下,顾问说我一年前就告诉过你,它还在挣钱,如果我可以说一年挣50%。 在蜱虫方面,你可以 几个月来做同样的事情,并不觉得有什么问题。 放松,要有信心,要有切实的效果。 ;) Renat Akhtyamov 2021.11.20 19:24 #262 darirunu1 #:这就是我))。 准则 darirunu1 2021.11.20 19:30 #263 Renat Akhtyamov #:ǞǞǞ 这是为什么呢?论坛上似乎总是会出现一些东西,然后人们走过来,把它带到一个不同的方向? darirunu1 2021.11.20 19:41 #264 Renat Akhtyamov #:你可以在蜱虫上做到这一点。几个月来做同样的事情,不要出汗。平静地、自信地、切切实实地。;) 我还没有想过这个问题,我的专家顾问挂了一年,以检查它的早期情况。在英镑方面,它经受住了所有的趋势。仿佛它知道何时开始交易。缩减率为1.47%。 a007 2021.11.20 19:50 #265 darirunu1 #:我还没有想到,它已经挂了一年了,以检查它的糟糕程度。在英镑上,它经受住了所有的趋势。仿佛它提前知道何时开始交易。缩减率为1.47%。 增加10倍的手数--利润增加10倍 darirunu1 2021.11.20 19:56 #266 a007 #:增加10倍的手数--利润增加10倍 Wababai,真是个聪明伶俐的孩子))。也许还有其他选择? SanAlex 2021.11.21 01:54 #267 撰写有效的顾问 - 待续。 那么,我们该从哪里开始呢? 1.什么是EA的最佳杠杆?- 我认为不会超过100 2.我认为对于一个EA来说,最重要的功能是很多。这是我们从中获得利润的功能。 3.---- 4.---- 等。---- EA还需要哪些功能才能有效? SanAlex 2021.11.21 03:04 #268 SanAlex # :写一个有效的顾问 - 待续。那么我们从哪里开始呢? 1. 什么样的杠杆对顾问更好。 - 我认为不超过100 2. 顾问的一项重要职能——据我所知,很多。我们也从这个函数中获得利润。 3.---- 4.----等等---- EA 交易需要哪些其他功能才能有效?那我就开始吧——如果你不介意的话——在下一个位置增加了手数(我挖和改变的黄色) //+------------------------------------------------------------------+ //| MACD Sample.mq5 | //| Copyright 2009-2017, MetaQuotes Software Corp. | //| http://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2009-2017, MetaQuotes Software Corp." #property link " http://www.mql5.com " #property version "5.50" #property description "It is important to make sure that the expert works with a normal" #property description "chart and the user did not make any mistakes setting input" #property description "variables (Lots, TakeProfit, TrailingStop) in our case," #property description "we check TakeProfit on a chart of more than 2*trend_period bars" #define MACD_MAGIC 1234502 //--- #include <Trade\Trade.mqh> #include <Trade\SymbolInfo.mqh> #include <Trade\PositionInfo.mqh> #include <Trade\AccountInfo.mqh> //+------------------------------------------------------------------+ //| ENUM_LOT_RISK | //+------------------------------------------------------------------+ enum LotMax { Lot= 0 , // Lots Lotx2= 1 , // Lots*2 }; //--- input LotMax InpLotRisk =Lotx2; // Lots,- Lots*2 input double InpLots = 0.01 ; // Lots input int InpMACDOpenLevel = 3 ; // MACD open level (in pips) input int InpMACDCloseLevel= 2 ; // MACD close level (in pips) input int InpMATrendPeriod = 26 ; // MA trend period //--- int ExtTimeOut= 10 ; // time out in seconds between trade operations //+------------------------------------------------------------------+ //| MACD Sample expert class | //+------------------------------------------------------------------+ class CSampleExpert { protected : double m_adjusted_point; // point value adjusted for 3 or 5 points CTrade m_trade; // trading object CSymbolInfo m_symbol; // symbol info object CPositionInfo m_position; // trade position object CAccountInfo m_account; // account info wrapper //--- indicators int m_handle_macd; // MACD indicator handle int m_handle_ema; // moving average indicator handle //--- indicator buffers double m_buff_MACD_main[]; // MACD indicator main buffer double m_buff_MACD_signal[]; // MACD indicator signal buffer double m_buff_EMA[]; // EMA indicator buffer //--- indicator data for processing double m_macd_current; double m_macd_previous; double m_signal_current; double m_signal_previous; double m_ema_current; double m_ema_previous; //--- double m_macd_open_level; double m_macd_close_level; datetime ExtPrevBars; // "0" -> D'1970.01.01 00:00'; public : CSampleExpert( void ); ~CSampleExpert( void ); bool Init( void ); void Deinit( void ); bool Processing( void ); double OptimizedBuy( void ); double OptimizedSell( void ); protected : bool InitIndicators( void ); bool LongOpened( void ); bool ShortOpened( void ); }; //--- global expert CSampleExpert ExtExpert; //+------------------------------------------------------------------+ //| Constructor | //+------------------------------------------------------------------+ CSampleExpert::CSampleExpert( void ) : m_adjusted_point( 0 ), m_handle_macd( INVALID_HANDLE ), m_handle_ema( INVALID_HANDLE ), m_macd_current( 0 ), m_macd_previous( 0 ), m_signal_current( 0 ), m_signal_previous( 0 ), m_ema_current( 0 ), m_ema_previous( 0 ), m_macd_open_level( 0 ), m_macd_close_level( 0 ), ExtPrevBars( 0 ) { ArraySetAsSeries (m_buff_MACD_main, true ); ArraySetAsSeries (m_buff_MACD_signal, true ); ArraySetAsSeries (m_buff_EMA, true ); } //+------------------------------------------------------------------+ //| Destructor | //+------------------------------------------------------------------+ CSampleExpert::~CSampleExpert( void ) { } //+------------------------------------------------------------------+ //| Calculate optimal lot size | //+------------------------------------------------------------------+ double CSampleExpert::OptimizedBuy( void ) { double PROFIT_BUY= 0.00 ; for ( int i= PositionsTotal ()- 1 ; i>= 0 ; i--) // returns the number of open positions { string position_GetSymbol= PositionGetSymbol (i); // GetSymbol позиции if (position_GetSymbol==m_symbol.Name()) { if (m_position.PositionType()== POSITION_TYPE_BUY ) { PROFIT_BUY=PROFIT_BUY+m_position.Select( Symbol ()); } } } double Lots=InpLots; double ab=PROFIT_BUY; switch (InpLotRisk) { case Lot: Lots=InpLots; break ; case Lotx2: if (ab> 0 && ab<= 1 ) Lots=InpLots* 2 ; if (ab> 1 && ab<= 2 ) Lots=InpLots* 4 ; if (ab> 2 && ab<= 3 ) Lots=InpLots* 8 ; if (ab> 3 ) Lots=InpLots* 16 ; break ; } return (Lots); } //+------------------------------------------------------------------+ //| Calculate optimal lot size | //+------------------------------------------------------------------+ double CSampleExpert::OptimizedSell( void ) { double PROFIT_SELL= 0.00 ; for ( int i= PositionsTotal ()- 1 ; i>= 0 ; i--) // returns the number of open positions { string position_GetSymbol= PositionGetSymbol (i); // GetSymbol позиции if (position_GetSymbol==m_symbol.Name()) { if (m_position.PositionType()== POSITION_TYPE_SELL ) { PROFIT_SELL=PROFIT_SELL+m_position.Select( Symbol ()); } } } double Lots=InpLots; double ab=PROFIT_SELL; switch (InpLotRisk) { case Lot: Lots=InpLots; break ; case Lotx2: if (ab> 0 && ab<= 1 ) Lots=InpLots* 2 ; if (ab> 1 && ab<= 2 ) Lots=InpLots* 4 ; if (ab> 2 && ab<= 3 ) Lots=InpLots* 8 ; if (ab> 3 ) Lots=InpLots* 16 ; break ; } return (Lots); } //+------------------------------------------------------------------+ //| Initialization and checking for input parameters | //+------------------------------------------------------------------+ bool CSampleExpert::Init( void ) { //--- initialize common information m_symbol.Name( Symbol ()); // symbol m_trade.SetExpertMagicNumber(MACD_MAGIC); // magic m_trade.SetMarginMode(); m_trade.SetTypeFillingBySymbol( Symbol ()); //--- tuning for 3 or 5 digits int digits_adjust= 1 ; if (m_symbol. Digits ()== 3 || m_symbol. Digits ()== 5 ) digits_adjust= 10 ; m_adjusted_point=m_symbol. Point ()*digits_adjust; //--- set default deviation for trading in adjusted points m_macd_open_level =InpMACDOpenLevel*m_adjusted_point; m_macd_close_level=InpMACDCloseLevel*m_adjusted_point; //--- set default deviation for trading in adjusted points m_trade.SetDeviationInPoints( 3 *digits_adjust); //--- if (!InitIndicators()) return ( false ); //--- succeed return ( true ); } //+------------------------------------------------------------------+ //| Initialization of the indicators | //+------------------------------------------------------------------+ bool CSampleExpert::InitIndicators( void ) { //--- create MACD indicator if (m_handle_macd== INVALID_HANDLE ) if ((m_handle_macd= iMACD ( NULL , 0 , 12 , 26 , 9 , PRICE_CLOSE ))== INVALID_HANDLE ) { printf ( "Error creating MACD indicator" ); return ( false ); } //--- create EMA indicator and add it to collection if (m_handle_ema== INVALID_HANDLE ) if ((m_handle_ema= iMA ( NULL , 0 ,InpMATrendPeriod, 0 , MODE_EMA , PRICE_CLOSE ))== INVALID_HANDLE ) { printf ( "Error creating EMA indicator" ); return ( false ); } //--- succeed return ( true ); } //+------------------------------------------------------------------+ //| Check for long position opening | //+------------------------------------------------------------------+ bool CSampleExpert::LongOpened( void ) { bool res= false ; //--- check for long position (BUY) possibility if (m_macd_current< 0 ) if (m_macd_current>m_signal_current && m_macd_previous<m_signal_previous) if ( MathAbs (m_macd_current)>(m_macd_open_level) && m_ema_current>m_ema_previous) { double price=m_symbol.Ask(); //--- check for free money if (m_account.FreeMarginCheck( Symbol (), ORDER_TYPE_BUY , OptimizedBuy() ,price)< 0.0 ) printf ( "We have no money. Free Margin = %f" ,m_account.FreeMargin()); else { //--- open position if (m_trade.PositionOpen( Symbol (), ORDER_TYPE_BUY , OptimizedBuy() ,price, 0.0 , 0.0 )) printf ( "Position by %s to be opened" , Symbol ()); else { printf ( "Error opening BUY position by %s : '%s'" , Symbol (),m_trade.ResultComment()); printf ( "Open parameters : price=%f" ,price); } } //--- in any case we must exit from expert res= true ; } //--- result return (res); } //+------------------------------------------------------------------+ //| Check for short position opening | //+------------------------------------------------------------------+ bool CSampleExpert::ShortOpened( void ) { bool res= false ; //--- check for short position (SELL) possibility if (m_macd_current> 0 ) if (m_macd_current<m_signal_current && m_macd_previous>m_signal_previous) if (m_macd_current>(m_macd_open_level) && m_ema_current<m_ema_previous) { double price=m_symbol.Bid(); //--- check for free money if (m_account.FreeMarginCheck( Symbol (), ORDER_TYPE_SELL , OptimizedSell() ,price)< 0.0 ) printf ( "We have no money. Free Margin = %f" ,m_account.FreeMargin()); else { //--- open position if (m_trade.PositionOpen( Symbol (), ORDER_TYPE_SELL , OptimizedSell() ,price, 0.0 , 0.0 )) printf ( "Position by %s to be opened" , Symbol ()); else { printf ( "Error opening SELL position by %s : '%s'" , Symbol (),m_trade.ResultComment()); printf ( "Open parameters : price=%f" ,price); } } //--- in any case we must exit from expert res= true ; } //--- result return (res); } //+------------------------------------------------------------------+ //| main function returns true if any position processed | //+------------------------------------------------------------------+ bool CSampleExpert::Processing( void ) { //--- we work only at the time of the birth of new bar datetime time_0= iTime (m_symbol.Name(), Period (), 0 ); if (time_0==ExtPrevBars) return ( false ); ExtPrevBars=time_0; if (!m_symbol.RefreshRates()) { ExtPrevBars= 0 ; return ( false ); } //--- refresh indicators if ( BarsCalculated (m_handle_macd)< 2 || BarsCalculated (m_handle_ema)< 2 ) return ( false ); if ( CopyBuffer (m_handle_macd, 0 , 0 , 2 ,m_buff_MACD_main) != 2 || CopyBuffer (m_handle_macd, 1 , 0 , 2 ,m_buff_MACD_signal)!= 2 || CopyBuffer (m_handle_ema, 0 , 0 , 2 ,m_buff_EMA) != 2 ) { ExtPrevBars= 0 ; return ( false ); } // m_indicators.Refresh(); //--- to simplify the coding and speed up access //--- data are put into internal variables m_macd_current =m_buff_MACD_main[ 0 ]; m_macd_previous =m_buff_MACD_main[ 1 ]; m_signal_current =m_buff_MACD_signal[ 0 ]; m_signal_previous=m_buff_MACD_signal[ 1 ]; m_ema_current =m_buff_EMA[ 0 ]; m_ema_previous =m_buff_EMA[ 1 ]; //--- it is important to enter the market correctly, //--- but it is more important to exit it correctly... //--- first check if position exists - try to select it //--- check for long position (BUY) possibility if (LongOpened()) return ( true ); //--- check for short position (SELL) possibility if (ShortOpened()) return ( true ); //--- exit without position processing return ( false ); } //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit ( void ) { //--- create all necessary objects if (!ExtExpert.Init()) return ( INIT_FAILED ); //--- secceed return ( INIT_SUCCEEDED ); } //+------------------------------------------------------------------+ //| Expert new tick handling function | //+------------------------------------------------------------------+ void OnTick ( void ) { static datetime limit_time= 0 ; // last trade processing time + timeout //--- don't process if timeout if ( TimeCurrent ()>=limit_time) { //--- check for data if ( Bars ( Symbol (), Period ())> 2 *InpMATrendPeriod) { //--- change limit time by timeout in seconds if processed if (ExtExpert.Processing()) limit_time= TimeCurrent ()+ExtTimeOut; } } } //+------------------------------------------------------------------+ 附加的文件: Vitaly_Murlenko.mq5 29 kb Shoker 2021.11.21 03:12 #269 Georgiy Merts #:这完全取决于定义最大值的顺序。一个经典的分形是五条,中间一条高于(低于)其他条。但是,在这幅图中,高点不是按照分形画的。现在,我将把目前的图表与经典的分形画成一条线。稍等片刻。在这里。欧洲美元的当前图表,看。如果我们用分形标记高点和低点,图表上有两条趋势线,都已经被突破了;它们的构建时刻用箭头标记。在穿透的那一刻,线条就断了。第三条下降线将通过昨天的 8点和18点分形画出。一旦价格跌至15小时低点以下,就应立即画出。 在这个例子中,当价格处于等于+/-突破这条趋势线的水平时,红色和蓝色的趋势线都已经画好了。在此基础上可以赚取多少(以点或波的百分比)? SanAlex 2021.11.21 03:48 #270 SanAlex #:那我就开始吧--如果你不介意的话--。在下一个位置增加了很多(黄色的地方是我挖的,也是我改的)。 这是没有关闭的结果 开盘和倍增当然是好事,我们必须以某种方式收集利润。 1.我们需要增加平仓,=例如用买入平仓获利-和卖出例如让他们挂牌直到获利到来。 1...202122232425262728293031323334...41 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
设想一下,顾问说
我一年前就告诉过你,它还在挣钱,如果我可以说一年挣50%。
在蜱虫方面,你可以
几个月来做同样的事情,并不觉得有什么问题。
放松,要有信心,要有切实的效果。
;)
这就是我))。
准则
ǞǞǞ
这是为什么呢?论坛上似乎总是会出现一些东西,然后人们走过来,把它带到一个不同的方向?
你可以在蜱虫上做到这一点。
几个月来做同样的事情,不要出汗。
平静地、自信地、切切实实地。
;)
我还没有想过这个问题,我的专家顾问挂了一年,以检查它的早期情况。在英镑方面,它经受住了所有的趋势。仿佛它知道何时开始交易。缩减率为1.47%。
我还没有想到,它已经挂了一年了,以检查它的糟糕程度。在英镑上,它经受住了所有的趋势。仿佛它提前知道何时开始交易。缩减率为1.47%。
增加10倍的手数--利润增加10倍
增加10倍的手数--利润增加10倍
Wababai,真是个聪明伶俐的孩子))。也许还有其他选择?
撰写有效的顾问 - 待续。
那么,我们该从哪里开始呢?
1.什么是EA的最佳杠杆?- 我认为不会超过100
2.我认为对于一个EA来说,最重要的功能是很多。这是我们从中获得利润的功能。
3.----
4.----
等。----
EA还需要哪些功能才能有效?
写一个有效的顾问 - 待续。
那么我们从哪里开始呢?
1. 什么样的杠杆对顾问更好。 - 我认为不超过100
2. 顾问的一项重要职能——据我所知,很多。我们也从这个函数中获得利润。
3.----
4.----
等等----
EA 交易需要哪些其他功能才能有效?
那我就开始吧——如果你不介意的话——
在下一个位置增加了手数(我挖和改变的黄色)
这完全取决于定义最大值的顺序。一个经典的分形是五条,中间一条高于(低于)其他条。但是,在这幅图中,高点不是按照分形画的。
现在,我将把目前的图表与经典的分形画成一条线。稍等片刻。
在这里。欧洲美元的当前图表,看。如果我们用分形标记高点和低点,图表上有两条趋势线,都已经被突破了;它们的构建时刻用箭头标记。在穿透的那一刻,线条就断了。第三条下降线将通过昨天的 8点和18点分形画出。一旦价格跌至15小时低点以下,就应立即画出。
在这个例子中,当价格处于等于+/-突破这条趋势线的水平时,红色和蓝色的趋势线都已经画好了。在此基础上可以赚取多少(以点或波的百分比)?
那我就开始吧--如果你不介意的话--。
在下一个位置增加了很多(黄色的地方是我挖的,也是我改的)。
这是没有关闭的结果
开盘和倍增当然是好事,我们必须以某种方式收集利润。
1.我们需要增加平仓,=例如用买入平仓获利-和卖出例如让他们挂牌直到获利到来。