
自己做一個函數,名稱隨你高興,以後自己記得就行,
比如 _ShowEntryExitPrice:
{Show Price of Entry,Exit on chart}
Value99=i_MarketPosition*i_CurrentContracts;
if Value99<>Value99[1] then begin
Value98=TEXT_New(Date , Time, iff(Value99>Value99[1], H+3, L-3),"");
TEXT_SetString(Value98, NumToStr(iff(Value99=0,ExitPrice(1),PosTradeEntryPrice(0, currententries-1)),0));
TEXT_SetStyle(Value98, 2, iff(Value99>Value99[1], 1, 0));
TEXT_SetColor(Value98, White);
TEXT_SetBGcolor(Value98, Blue);
TEXT_SetSize(value98,9);
end;
然後就在你自己的策略訊號中把的這個建立好的函數,呼叫來使用即可,範例:
if C > Average(C,20) and marketposition<=0 then
buy ("B") next bar High stop;
if C > Average(C,20) and marketposition>0 and D>entrydate(0) then
buy ("+1") next bar High stop;
if C < Average(C,20) and marketposition>0 then
sell next bar market;
_ShowEntryExitPrice;
然後,你就可以在圖表上看到效果。在發生訊號動作的K棒上下,就會看到以藍底白字的形式,顯現出進出場的價位:
相同作用,在 HTS 上。