任何菜鸟问题,为了不给论坛添乱。专业人士,不要路过。没有你就无处可去 - 6. - 页 273

 
Zhunko:
图书馆
测试脚本中的例子。

谢谢你,瓦迪姆 :)我明白这个方向,我想在MQL4中实现它,不需要dll。

 
Barbarian:

谢谢你,瓦迪姆 :)我明白这个方向,我想在MQL4中实现它,不需要dll。

它不会起作用。
 

double bb_up0=iBands(NULL,0,bb_p,bb_dev,0, bb_ap,MODE_UPPER,0)。

double bb_lo0=iBands(NULL,0,bb_p,bb_dev,0, bb_ap,MODE_LOWER,0)。

//--- 先生们,布林线 中线,下面,这些都是正确的选择,还是有错误的选择?在MT5中,中间线的问题已经解决了,在MT4中我还没有看到。

如果你用Alert脚本检查,结果是一样的,但还是?

double bb_bs0= (bb_up0+ bb_lo0)/2。

double bb_bs0= iMA(NULL,0,bb_p, 0,0,bb_ap, 0)。

double bb_bs0= iBands(NULL,0,bb_p,bb_dev,0, bb_ap,MODE_MAIN, 0);

double bb_bs0= iBands(NULL,0,bb_p,bb_dev,0, bb_ap,0, 0);

 
Zhunko:
不会的。

是的,我已经意识到,如果没有dll,它就无法工作。

 
rosomah:

double bb_up0=iBands(NULL,0,bb_p,bb_dev,0, bb_ap,MODE_UPPER,0)。

double bb_lo0=iBands(NULL,0,bb_p,bb_dev,0, bb_ap,MODE_LOWER,0)。

//------ 先生们,布林线均线,下面,这些都是正确的选择,还是有错误的选择?MT5已经解决了中间线的问题,我在MT4中还没有看到。

如果你用Alert脚本检查,结果是一样的,但还是?

double bb_bs0= (bb_up0+ bb_lo0)/2。

double bb_bs0= iMA(NULL,0,bb_p, 0,0,bb_ap, 0)。

double bb_bs0= iBands(NULL,0,bb_p,bb_dev,0, bb_ap,MODE_MAIN, 0);

double bb_bs0= iBands(NULL,0,bb_p,bb_dev,0, bb_ap,0, 0);

这里是BB建设的主要周期。

//--- main cycle
   for(i=pos; i<rates_total && !IsStopped(); i++)
     {
      //--- middle line
      ExtMovingBuffer[i]=SimpleMA(i,InpBandsPeriod,close);
      //--- calculate and write down StdDev
      ExtStdDevBuffer[i]=StdDev_Func(i,close,ExtMovingBuffer,InpBandsPeriod);
      //--- upper line
      ExtUpperBuffer[i]=ExtMovingBuffer[i]+InpBandsDeviations*ExtStdDevBuffer[i];
      //--- lower line
      ExtLowerBuffer[i]=ExtMovingBuffer[i]-InpBandsDeviations*ExtStdDevBuffer[i];
      //---
     }

下面是一个简单的MA的计算。

//+------------------------------------------------------------------+
//| Simple Moving Average                                            |
//+------------------------------------------------------------------+
double SimpleMA(const int position,const int period,const double &price[])
  {
//---
   double result=0.0;
//--- check position
   if(position>=period-1 && period>0)
     {
      //--- calculate value
      for(int i=0;i<period;i++) result+=price[position-i];
      result/=period;
     }
//---
   return(result);
  }
//+------------------------------------------------------------------+

正如你所看到的,中心线是一个简单的收盘价MA。其余的都是以它为基础。因此,请得出你自己的结论。

SZZ.作为你进一步工作的小册子。

你设置的平均值如下:double bb_bs0 = (bb_up0+ bb_lo0)/2;

但最好这样计算: 双bb_bs0= (bb_up0+ bb_lo0)*0.5

毕竟,乘法要比除法快。

 
artmedia70:

这里是建造BB的主要周期。

下面是一个简单的MA的计算。

正如你所看到的,中心线是Close上一个简单的MA。其余的都是以它为基础。你可以得出你自己的结论。

SZZ.作为你进一步工作的小册子。

你设置的平均值如下:double bb_bs0 = (bb_up0+ bb_lo0)/2;

但最好这样计算: 双bb_bs0= (bb_up0+ bb_lo0)*0.5

毕竟,乘法要比除法快。



1.以布林带 的价格IMHO...

 
TWAP(不是VWAP)是谁计算的?它是如何计算的?我从网上的解释中一点也不明白......。
 
Barbarian:

是的,我已经意识到,如果没有dll,它将无法工作。


说明理由。
 

我现在注意到一件奇怪的事情。有一个基础库可以导入 其他库。这里有一个片段。

//+---------------------------------------------------------------------------------------------------------------------------------------+
//| Библиотека базовых функций.                                                                                                           |
//+---------------------------------------------------------------------------------------------------------------------------------------+
// ================================================== Включения и импорт внешних модулей =================================================+
#include <hoz_Base@Include.mqh>
//+---
#import "hoz_LoggingToAnyWere@library.ex4"
    void fWrite_Log (string fs_Txt);
    void fPrint (string fs_Text);
#import
//+---
#import "hoz_HandlingWithErrorS@library.ex4"
    bool fErrorHandling (int fi_Error, bool& fb_InvalidSTOP);
    void fReConnect();
    string fErrorToString (int fi_Error);
    string fErrorDescription (int fi_Error);
#import
//+---
#import "hoz_ReturningSomeInfo@library.ex4"
    string fGet_NameOP (int fi_Type);
    string fGet_NameTF (int fi_TF = 0);
#import

当我启动owl时,我正在用这些库编写,我在日志中看到。

2013.11.23 16:15:51     2012.01.01 22:00  hoz_ReturningSomeInfo@library EURUSD,M5: loaded successfully
2013.11.23 16:15:51     2012.01.01 22:00  hoz_Base@Library EURUSD,M5: loaded successfully
2013.11.23 16:15:51     ExperT inputs: i_MAXSpread=50; i_Lot=0.1; i_KLot=2; i_SL=0; i_TP=10; i_Slippage=3; i_NumberOfTry=10; i_DistanceFromLastPos=10; i_TriggerForBU=25; i_PreservedProfit=5; TStop.Buy=70; TStop.Sell=10; TrailingStep=20; i_magic=3333021; 

也就是说,根据日志,有2个库被加载:hoz_ReturningSomeInfo@libraryhoz_Base@Library

但这些图书馆缺少: hoz_LoggingToAnyWere@library.ex4, hoz_HandlingWithErrorS@library.ex4 ,在杂志上它应该是这样的吗?还是说所有上传的图书馆都应该在期刊中列出?

 
Integer:

说明理由。

至少从winapi的dll中可以看到,向窗口发送字符的情况。