|
本帖最後由 TrendRover 於 10-12-21 12:20 AM 編輯
不行.
[IntrabarOrderGeneration = false]
inputs:
TLRef( 1 ) ,TLRef2(2) ;
variables:
var0( TL_GetBeginDate( TLRef ) ),
var1( TL_GetBeginTime( TLRef ) ),
var2( false ) ;
var2 = ( Date = var0 and ( BarType = 2 or ( BarType = 1 and Time >= var1 ) ) )
or Date > var0 ;
condition1 = var2 and High < TL_GetValue( TLRef, Date, Time ) ;
if condition1 then
Buy ("LE") next bar at TL_GetValue( TLRef, Date next bar, Time next bar ) stop ;
[IntrabarOrderGeneration = true]
condition2= var2 and high > TL_Getvalue(TLRef2,Date,Time) ;
if condition2 then
sell ("LX") from entry ("LE") next bar at market ;
compiled 過了 .
但執行時抱怨:
intrabar 和 next bar 不可共用於同策略 . |
|