COCO研究院

 找回密碼
 註冊
搜索
查看: 3098|回復: 5

請問自制指標上如何畫高低

[複製鏈接]
發表於 17-7-26 10:43 | 顯示全部樓層 |閱讀模式
如題,我有 個自制指標,為方便想畫出該指標的高低,伹我用dailyhigh/low晝出的只是原數據的high/low,如果想要指標上的high/low應如何做?謝謝各位
發表於 17-7-26 13:07 | 顯示全部樓層
==========
ind = 自訂指標;
HValue = Highest(ind, Length);
LValue = Lowest(ind, Length);
==========
從你片面的描述頂多只有這樣~
其他請自行補完~
 樓主| 發表於 17-7-26 17:54 | 顯示全部樓層
不好意思是我表達不清楚, 附件上的是將2個data相減後的指標,而我想表示出指標的每日高低,要如何做?

(apollochung 感謝你的回覆,但我完全不明白如何做?)
WeChat 圖片_20170726165311.png
發表於 17-8-7 12:51 | 顯示全部樓層
本帖最後由 hohooh 於 17-8-7 12:57 編輯
  1. ind=data1-data2;
  2. if date<>date[1] then begin
  3.    HH=ind;
  4.    LL=ind;
  5. end;
  6. if ind>HH then HH=ind;
  7. if ind<LL then LL=ind;
  8. plot1(HH, "highest today");
  9. plot2(LL, "lowest today");
複製代碼
以上方法會畫出兩條線表示出今天的高低點;算是比較快速簡單的方法

如果你想在像卷商版的在圖上寫一個文字或打個箭頭之類的, 用
Text_New (BarDate, BarTime, PriceValue,"Text")
Arw_New (BarDate, BarTime, PriceValue, Direction)
因為寫起來很複雜,,先給個方向你研究一下,


 樓主| 發表於 17-8-9 17:43 | 顯示全部樓層
不好意思hohooh,我照你寫的打ind=data1-data2;, ind變灰了及編譯出"syntax error, unexpected 'data'",何解?
發表於 17-8-10 10:10 | 顯示全部樓層
也許有些bug,你再修改成你要的吧~
==========
Variables:
        ind(0),
        indDHigh(0),
        indDLow(0),
        counter(0);
ind = XXXXXXXXXXXXX;
counter = 2;
If (Date <> Date[1]) then Begin
        indDHigh = 0;
        indDLow = 999999;
        While (Date[counter] = Date[counter + 1]) Begin
                If (ind[counter] > indDHigh) then indDHigh = ind[counter];
                If (ind[counter] < indDLow) then indDLow = ind[counter];
                counter = counter + 1;
        End;
End;
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

手機版|Archiver|站長信箱|廣告洽詢|COCO研究院

GMT+8, 24-4-20 00:28

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回復 返回頂部 返回列表
理財討論網站 | AI繪圖AI超擬真美女AI beauty AI Stable DiffusionAI正妹AI Lookbook