哪位好心人能帮我把下面多单改成空单
哪位好心人能帮我把下面多单改成空单,我改了后总是下太多空单,不符合我的策略,谢谢!(我把 high和low ,BId和Ask,“<”和“>”互换,下单量却非常大,而且“(lowtime-Time)<=”个参数好象不管用)[*]datetime hightime=0;
[*]double high0=0;
[*]datetime timebar=0;
[*]int OnInit()
[*]{
[*] return(INIT_SUCCEEDED);
[*]}
[*]void OnDeinit(const int reason)
[*]{
[*]
[*]}
[*]void OnTick()
[*]{
[*] if(timebar!=Time)//每根新的k线产生 重新初始化记录的价格和时间
[*] {
[*] high0=0;
[*] hightime=0;
[*] timebar=Time;
[*] }
[*] if(NormalizeDouble(high0,Digits)<NormalizeDouble(High,Digits))
[*] {
[*] high0=NormalizeDouble(High,Digits);
[*] hightime=TimeCurrent();
[*] }
[*] if((High-Open)>=50*Point && (hightime-Time)<=120)
[*] {
[*] bool a=OrderSend(Symbol(),OP_BUY,0.1,Ask,10,Bid-50*Point,Bid+50*Point,"开多单" ,12345,Red); //开多单
[*] }
[*]}
小手一抖,积分到手! 找到好贴不容易,我顶你了,谢了 沙发!沙发! 帮你顶下哈!! 帮你顶下哈!! 学习了,不错 帮你顶下哈!! 学习了,不错 谢谢
页:
[1]
2