|
osdak 發表於 14-8-1 16:40
我去問過customer service, 就我所理解和看CS回覆, applystop只是在backtest起作用, 於實際交易中要用equ ...
剛才copy出來時不知為什麼少了[ i ]
以下直接copy入你AFL裡就可以了
dist = 2*ATR(10);
FirstVisibleBar = Status( "FirstVisibleBar" );
Lastvisiblebar = Status("LastVisibleBar");
for( i = Firstvisiblebar; i <= Lastvisiblebar AND i < BarCount; i++)
{
if( Buy [ i ]) PlotText( "Buy\n"+NumToStr(BuyPrice, 1.2) , i, L[ i ]-dist, colorGreen, colorYellow );
if( Sell [ i ]) PlotText( "Sell\n" +NumToStr(SellPrice, 1.2), i, H[ i ]+dist, colorRed, colorYellow );
if( Short [ i ]) PlotText( "Short\n" +NumToStr(ShortPrice, 1.2), i, H[ i ]+dist, colorBlue, colorRed );
if( Cover [ i ]) PlotText( "Cover\n"+NumToStr(CoverPrice, 1.2) , i, L[ i ]-dist, colorYellow, colorRed );
}
|
|