一个关于基础数据使用的问题 [开拓者 TB]
at","time");
plt.setOption("rollover","margin-top","99%");
plt.setOption("rollover","margin-bottom","95%");
//AddDataFlag(Enum_Data_RolloverBackWard()); //设置后复权
}
SetBeginBarMaxCount(10);
}
OnBar(ArrayRef<Integer> indexs)
{
Commentary("CurrentBar = "+text(CurrentBar)); PlotBool("test1",c>o,high);
Range[0:DataCount - 1]
{
Integer cgy = Category();
If(cgy == 1) //期货换月
{
If(GetDicTime(fRollover, 0) <> GetDicTime(fRollover, 1) And fRollover[0][1] <> InvalidString And fRollover[0][2] <> InvalidString)
{
String tooltips = "换月前价格:"+fRollover[0][1]+
"\n换月后价格:"+fRollover[0][2];
plt.icon("rollover",date+time,InvalidInteger,"xinghao",tooltips);
//PlotAuto("con",False,low); //在bar的最高价位置输出条件con的布尔值。
}
}
Else If(cgy == 0) //股票除权
{
If(GetDicTime(sXDXR, 0) <> GetDicTime(sXDXR, 1) And (sXDXR[0][0] <> InvalidNumeric Or (sXDXR[0][1] <> InvalidNumeric And sXDXR[0][2] <> InvalidNumeric)
Or sXDXR[0][3] <> InvalidNumeric Or sXDXR[0][4] <> InvalidNumeric) And sXDXR[0][5] <> InvalidNumeric)
{
String tooltips = "发布时间:"+Text(UTC2Local(sXDXR[0][0])) +
IIFString(Text(sXDXR[0][1]) == InvalidString,"","\n每十股送股:"+ Text(sXDXR[0][1] * 10) + "股") +
IIFString(Text(sXDXR[0][2]) == InvalidString,"","\n配股比例:"+ Text(sXDXR[0][2])) +
IIFString(Text(sXDXR[0][3]) == InvalidString,"","\n配股价格:"+ Text(sXDXR[0][3])) +
IIFString(Text(sXDXR[0][4]) == InvalidString,"","\n每十股红利:"+ Text(sXDXR[0][4] * 10) + "元") +
IIFString(Text(sXDXR[0][5]) == InvalidString,"","\n股票除权前价格:"+ Text(sXDXR[0][5]));
plt.icon("rollover",date+time,InvalidInteger,"xinghao",tooltips);
}
}
}
}
plt.setOption("rollover","margin-top","99%");
plt.setOption("rollover","margin-bottom","95%");
//AddDataFlag(Enum_Data_RolloverBackWard()); //设置后复权
}
SetBeginBarMaxCount(10);
}
OnBar(ArrayRef<Integer> indexs)
{
Commentary("CurrentBar = "+text(CurrentBar)); PlotBool("test1",c>o,high);
Range[0:DataCount - 1]
{
Integer cgy = Category();
If(cgy == 1) //期货换月
{
If(GetDicTime(fRollover, 0) <> GetDicTime(fRollover, 1) And fRollover[0][1] <> InvalidString And fRollover[0][2] <> InvalidString)
{
String tooltips = "换月前价格:"+fRollover[0][1]+
"\n换月后价格:"+fRollover[0][2];
plt.icon("rollover",date+time,InvalidInteger,"xinghao",tooltips);
//PlotAuto("con",False,low); //在bar的最高价位置输出条件con的布尔值。
}
}
Else If(cgy == 0) //股票除权
{
If(GetDicTime(sXDXR, 0) <> GetDicTime(sXDXR, 1) And (sXDXR[0][0] <> InvalidNumeric Or (sXDXR[0][1] <> InvalidNumeric And sXDXR[0][2] <> InvalidNumeric)
Or sXDXR[0][3] <> InvalidNumeric Or sXDXR[0][4] <> InvalidNumeric) And sXDXR[0][5] <> InvalidNumeric)
{
String tooltips = "发布时间:"+Text(UTC2Local(sXDXR[0][0])) +
IIFString(Text(sXDXR[0][1]) == InvalidString,"","\n每十股送股:"+ Text(sXDXR[0][1] * 10) + "股") +
IIFString(Text(sXDXR[0][2]) == InvalidString,"","\n配股比例:"+ Text(sXDXR[0][2])) +
IIFString(Text(sXDXR[0][3]) == InvalidString,"","\n配股价格:"+ Text(sXDXR[0][3])) +
IIFString(Text(sXDXR[0][4]) == InvalidString,"","\n每十股红利:"+ Text(sXDXR[0][4] * 10) + "元") +
IIFString(Text(sXDXR[0][5]) == InvalidString,"","\n股票除权前价格:"+ Text(sXDXR[0][5]));
plt.icon("rollover",date+time,InvalidInteger,"xinghao",tooltips);
}
}
}
}
//------------------------------------------------------------------------
// 编译版本 GS2014.10.25
// 版权所有 TradeBlazer Software 2003-2025
// 更改声明 TradeBlazer Software保留对TradeBlazer平
// 台每一版本的TradeBlazer公式修改和重写的权利
//------------------------------------------------------------------------
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容