看板 Trading 關於我們 聯絡資訊
出錯的程式碼: if marketposition=0 and RSI(C,10)[1]<30 then print(Date,time,RSI(c,10),RSI(c,10)[1]) end if 顯示出來的RSI(c,10)值正確, 但RSI(c,10)[1]值卻有一堆都是0 圖表上是10000根5分鐘K棒...此錯誤不知要如何改正? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 106.104.41.24 ※ 文章網址: https://www.ptt.cc/bbs/Trading/M.1427039606.A.07E.html
are2: 試試RSI(c[1],10) 03/24 00:56
goodddog: 還是錯誤... 03/25 12:41
shyart: 有試過用 variable AA 接 RSI(c,10), 然後用 AA[1] 嗎? 03/30 15:32
goodddog: 試過,還是一樣 04/01 11:37
goodddog: print那一行若放在if判斷式以外顯示結果就正常 04/01 11:38
shyart: 好怪... 所以同一個 print 在 if 外 跟 if 內是不同的 04/07 07:58
shyart: 這好難想像喔, 不過我個人的習慣會在print 中 加marker 04/07 08:00
shyart: 如"before if""in if""after if" 的說明確定 print的位置 04/07 08:02
shyart: 可以試試看 如果還是一樣的結果 那就這問題就難找一點了 04/07 08:04