datetime NB_M1;
intOnInit()
{
}
voidOnTick()
{
if (CIsNewBar(_Symbol,PERIOD_M1)) // (1) Если появился новый бар M1
{NB_M1=TimeCurrent();}
......
}
并保存之前的值
datetime NB_01_M1, NB_02_M1;
intOnInit()
{
}
voidOnTick()
{
if (CIsNewBar(_Symbol,PERIOD_M1)) // (1) Если появился новый бар M1
{NB_02_M1=NB_01_M1; NB_01_M1=TimeCurrent();}
......
}
int s, len;
double main[];
double min, max;
len = (int)ChartGetInteger(0, CHART_VISIBLE_BARS); // длина копируемых видимых значений
s = (int)ChartGetInteger(0, CHART_FIRST_VISIBLE_BAR) - len + 1; // 1-й видимый бар минус длина -- начало копируемых баровif (CopyBuffer(handle, MAIN_LINE, s, len, main) != len)
return;
// handle - хэндэл осциллятора// MAIN_LINE - меняем на нужный индекс буфера осциллятора// получаем мин. и макс. значения
min = main[ArrayMinimum(main, 0, WHOLE_ARRAY)];
max = main[ArrayMaximum(main, 0, WHOLE_ARRAY)];
识别码为CHART_PRICE_MIN 和CHART_PRICE_MAX。
返回true/false , 我们谈论的是什么时间?
该类存储了前一个刻度的时间,真/假不是由该类返回,而是由该类的 一个成员函数返回。
该类存储了前一个刻度的时间,真/假不是由该类返回,而是由该类的 一个成员函数返回。
在你发布的代码中,只有公共栏!
鉴于该类报告了一个新的酒吧,时间是iTime(所有你需要的,0)。
iTime(all you need,1)分别为上一次的时间。
Z.U. 也许你知道如何用几分之一秒来获得时间...
在你发布的代码中,publc只有bool!
鉴于该类报告了一个新的酒吧,时间是iTime(所有你需要的,0)。
iTime(all you need,1)分别为上一次的时间。
Z.U. 也许你知道如何用几分之一秒来获得时间...
我的错误,对不起
,我不需要几分之一秒的时间。我需要抓住一个新酒吧的第一秒
错了一点,对不起
,我不需要几分之一秒的时间。我需要抓住一个新酒吧的第一秒
像这样
并保存之前的值
那么它就像这样
谢谢你,MakarFX,我将尝试一下)
好的,谢谢,我会考虑并在测试器中运行它。
请告诉我更多关于代码中的马丁函数的信息。
我需要在哪里更换一些东西,以便马丁传播到有利可图的订单而不是无利可图的订单?
请告诉我更多关于你代码中的Martin函数。
我应该在哪里替换什么,以便将马汀应用于盈利的订单而不是亏损的订单?
突出显示......如果<0,那么亏损交易的手数会增加
如果>0,那么盈利交易的手数就会增加
这似乎是你所需要的。
这样做是不对的!这就是你如何获得仪器的最低和最高价格,而不是震荡器。一个有经验的程序员都不好意思对这样的初级问题给出这样的答案......。
事实上,你需要使用CopyBufer获得振荡器数据
如何创建一个震荡器
或任何其他你需要的振荡器。
突出显示......如果<0,那么亏损交易的手数就会增加
如果>0,那么盈利交易的手数将增加。
非常感谢您