谁想要一个战略?很多,而且是免费的) - 页 50

 

按条记录 "和 "按位置记录 "之间没有任何区别。它们只是以不同的方式显示信息。


*一个数据条过滤器 "过滤""按位置排列的日志 "*看起来是这样,因为在 "最古老的'm'条 "之前没有条目。按条记录 "显示条,因为它们被载入程序中,但在 "最旧 "的条中没有执行任何交易。


数据条过滤器 "和 "日期过滤器 "正是如此--过滤器。它们被用来允许(或禁止)在指定的区间内进入市场。这并不改变战略逻辑。


我们不能在 "收盘逻辑条件 "槽中使用 "数据条过滤 "或 "日期过滤"。这将改变战略退出的逻辑。

 
Miroslav_Popov писал(а)>>

按条记录 "和 "按位置记录 "之间没有任何区别。它们只是以不同的方式显示信息。

*一个数据条过滤器 "过滤""按位置排列的日志 "*看起来是这样,因为在 "最古老的'm'条 "之前没有条目。按条记录 "显示条,因为它们被载入程序中,但在 "最旧 "的条中没有执行任何交易。

数据条过滤器 "和 "日期过滤器 "正是如此--过滤器。它们被用来允许(或禁止)在指定的区间内进入市场。这并不改变战略逻辑。

我们不能在 "收盘逻辑条件 "槽中使用 "数据条过滤 "或 "日期过滤"。这将改变战略退出的逻辑。

我非常理解这一切。

我试图利用这些 "变态",以便

1)对左右两边的一段优化进行限制。

2.要看到出了优化图后的 策略行为。

3.图形化的曲线并没有干扰到看图形中相对真实的部分。(第1点--见左、右边界的历史部分)

4.尽量减少在同一时间内按下按钮的次数。

(而在现实中,往往需要对历史的某些部分进行更仔细的 "观察")。同时,打开一个单独的(完整的图表)窗口 "平衡/权益图 "并不方便)。

而这一切都要等到 数据水平线中的 "删除当时的数据 "复选框的错误被修复

因此,让我们等待Data Horizont !!!!

 

杂志中的第一根柱子位于...1254. 这一点,IMHO,不应该改变。


外汇策略生成器希望至少有300条。因为它是1554-300= 1254

 
/// <summary>
/// Data Horizon - Cuts some data
/// </summary>
int DataHorizon()
{
	if (iBars < MINIMUMBARS) return 0;

	int  iTempBars     = iBars;
	int  iTempStartBar = 0;
	int  iTempEndBar   = iBars - 1;
	bool bChange       = false;

	// Set the maximum nuber of bars
	if (iBars > iMaxBars && iMaxBars >= MINIMUMBARS)
	{   // We need to cut out the oldest bars
		iTempBars     = iMaxBars;
		iTempStartBar = iBars - iMaxBars;
		bChange       = true;
	}
	

	// Set the starting date
	DateTime dtStartingDate = new DateTime( iStartYear, iStartMonth, iStartDay);
	if ( bUseStartDate && aBar[ iTempStartBar].Time < dtStartingDate)
	{   // We need to cut out the oldest bars
		for (int iBar = iTempStartBar; iBar < iTempBars - MINIMUMBARS; iBar++)
		{
			if ( aBar[ iBar].Time >= dtStartingDate)
			{
				iTempStartBar = iBar;
				iTempBars     = iTempEndBar - iTempStartBar + 1;
				bChange       = true;
				break;
			}
		}
	}

	// Set the end date
	DateTime dtEndingDate   = new DateTime( iEndYear, iEndMonth, iEndDay);
	if ( bUseEndDate && aBar[ iTempEndBar].Time > dtEndingDate)
	{   // We need to cut out the newest bars
		for (int iBar = iTempStartBar + MINIMUMBARS; iBar < iTempEndBar; iBar++)
		{
			if ( aBar[ iBar].Time >= dtEndingDate)
			{
				iTempEndBar = iBar - 1;
				iTempBars   = iTempEndBar - iTempStartBar + 1;
				bChange     = true;
				break;
			}
		}
	}

	// Cut the data
	if ( bChange)
	{
		Bar[] aBarCopy = new Bar[iBars];
		aBar. CopyTo( aBarCopy, 0);

		aBar = new Bar[ iTempBars];
		for (int iBar = iTempStartBar; iBar <= iTempEndBar; iBar++)
			aBar[ iBar - iTempStartBar] = aBarCopy[ iBar];

		iBars  = iTempBars;
		dtTime = aBar[ iTempBars - 1].Time;
		bCut   = true;
	}

	return 0;
}

最低限度 = 300

iMaxBars - 我们在 "数据水平线 "中设置的内容

 

:( 我不能正常发布代码。它删除了前面的制表符。

 
Miroslav_Popov писал(а)>>

// Set the starting date
DateTime dtStartingDate = new DateTime(iStartYear, iStartMonth, iStartDay);
if (bUseStartDate && aBar[iTempStartBar].Time < dtStartingDate)
{ // We need to cut out the oldest bars
for (int iBar = iTempStartBar; iBar < iTempBars - MINIMUMBARS; iBar++)
{
if (aBar[iBar].Time >= dtStartingDate)
{
iTempStartBar = iBar;
iTempBars = iTempEndBar - iTempStartBar + 1;
bChange = true;
break;
}
}
}

即(你必须使用Ctrl+Alt+M,而不是文本格式化)。

if ( bUseStartDate && aBar[ iTempStartBar].Time < dtStartingDate)
{ // We need to cut out the oldest bars
 for (int iBar = iTempStartBar; iBar < iTempBars - MINIMUMBARS; iBar++)
 {
  if ( aBar[ iBar].Time >= dtStartingDate)
  {
   iTempStartBar = iBar;
   iTempBars = iTempEndBar - iTempStartBar + 1;
   bChange = true;
   break;
  }
 }
}

但在哪里还能 看到第一个如果

还是你想

if (bUseStartDate && aBar[iTempStartBar].Time < dtStartingDate)
 iTempStartBar = Какая_там_функция_пересчета_времени_в_бары(dtStartingDate)

同样,"结束日期 "也是如此

 

**第一个如果 在哪里?

我们削减数据时。

1.复选框被选中:bUseStartDate == true

2.选择的日期比我们的历史数据的开始时间晚(较新): aBar[iTempStartBar].Time < dtStartingDate


在相反的情况下,根本不存在切割。


-------

编辑。

你不能删除超过2008年9月30日的日期。这是因为如果你删除它们,剩下的将少于300条。(日线图)


for (int iBar = iTempStartBar;iBar < iTempBars - MINIMUMBARS; iBar++)

 
Miroslav_Popov писал(а)>>

** 第一个ifelse 在哪里? **

是的,匆匆忙忙地,我很抱歉。:(

事实证明,在H4上生成策略时,我不能使用少于2.5个月的时间(300/6=50天--没有柱子的周末~2.5个月),这不是关键,而且策略检查(OOS)的时间间隔也必须不晚于2个月开始。当前日期前5个月(不方便,因为我怀疑调整后的策略会活这么久,而且看 "前天优化的策略今天会如何表现 "更有意思),或者减去 "重叠部分",或者......。在文件中添加空条(希望电脑时间没有被选中)。

:)

摘要 - 我总是设置最大的条数(以避免生成挂起),并按日期设置优化/检查间隔。

 

. добавлять пустые бары в файл (надеюсь, что время компьютера не проверяется)


它将抓住他们。移除 "市场 "复选标记 - "检查数据"

 
voltair >> :

那么需要哪些数据来正确选择呢?你需要调查什么?

比如说...该战略在不同类型的市场中是如何表现的,现在...我遇到的情况往往是一年的利润超过2,最后一个月的流失,而且趋势还在持续。