請問如要在訊號出現時加上價位(開/高/收/低)要如何寫?
if condition1 then begin Buy("B") next bar at market; end;
if condition2 then begin sellshort("S") next bar at market; end;
謝謝您
不很清楚你的問題是什麼說..XD
可否詳述...XD
if condition1 then begin Buy("B") next bar at market;
Text_new(date, time, low-5,numtostr(open,0)+" "+numtostr(high,0)+" "+numtostr(close,0)+" "+numtostr(low,0));
end;
if condition2 then begin sellshort("S") next bar at market;
Text_new(date, time, high+5,numtostr(open,0)+" "+numtostr(high,0)+" "+numtostr(close,0)+" "+numtostr(low,0)); end;
我的意思是...
在買進訊號出現時可以標上當根K的最低價
在賣出訊號出現時可以標上當根K的最高價
感謝您的幫忙!
感謝..Soromance..看來有新的高手出現囉..XD
不知道你要的是否這樣的效果?
謝謝阿政兄...
是這樣沒錯,但我想要的不是進場價,是想要當K的最低價或最高價
感謝您的協助!
使用 Soromance 的方式,把串組的文字內容改成你要的東西就可以了
也可以再配合 阿政 的字串物件的做美化動作
Text_new(date, time, low-5," "+numtostr(low,0));
Text_new(date, time, high+5," "+numtostr(high,0)); end;
你的意思是改成這樣嗎...可是會一直出現價位吔...怪怪的!
您是否確認一下您的程式邏輯有沒有問題,
按照目前的寫法,只有condition1 / condition2成立時,才有走到text_new,應該不會一直出現才是。
只有一種可能,你的condition1 / condition2一直成立,所以text_new才會一直被執行。
要的就是"訊號出現"時
Value1=marketposition;
充份必要條件就是→Value1<>Value[1]
直接用這個做判斷就好了,拿 BuyCondition 或是 ShortCondition不見得會引起訊號的變化啊 =_=
把以下紅色的部份直接換成你要的數值就行了...
{Show Price of Entry,Exit on chart}
感謝各位前輩指導...
我來試試!
大大的感恩!