COCO研究院

 找回密碼
 註冊
搜索
查看: 25274|回復: 0

[教學] 基本上依照Youtube去寫保力加通道AFL,請問為何仍不成

[複製鏈接]
發表於 18-1-27 12:20 | 顯示全部樓層 |閱讀模式
各位師兄好︰

小弟想寫一套Code,在保力加底部買入,在保力加頂部沽空,已盡力在網上找尋參考資源,看到此一影片youtube有一保力加AFL教學(本想貼上連結,我卻沒有權限)。
小弟基本上照足,只是他是在頂部買入,底部賣出,和保力加參數有所修改,但不明白我寫的,有好些訊號未到頂便沽空,未到底便買入,實在不知問題在哪裡,希望獲得各位指教,無言感謝!


BolliTop = BBandTop (C, 25, 1);
BolliBot = BBandBot (C, 25, 1);

Buy = C <= BolliBot;
Short = C >= BolliTop;

Buy = ExRem( Buy, Short );
Short = ExRem( Short, Buy );

Cover = Buy;
Sell = Short;

SetPositionSize(1000,spsShares);

/* Plot Buy and Sell Signal Arrows */
shape = Buy * shapeUpArrow + Short * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) );
GraphXSpace = 5;
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

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

GMT+8, 24-12-22 19:37

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回復 返回頂部 返回列表
理財討論網站 |