一個簡單的程序,只想在模擬盤上跑一下日線的bar,滿足臨近收盤價進場或出場的功能,請管理員幫忙看看有什么問題和漏洞,多謝!
if(BarStatus==2)
{
if(CurrentTime>0.145950)
{
if (a_buyposition==0 and con1)
{
Buy(myunits,q_askprice);
}
if (a_buyposition==1 and con2)
{
sell(0,q_bidprice);
}
}
}
Else
{
if (MarketPosition==0 and con1)
{
Buy(myunits,Close);
}
if (MarketPosition==1 and con2)
{
sell(0,close);
}
}