ken20111 發表於 18-1-27 12:20

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

各位師兄好︰

小弟想寫一套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;
頁: [1]
查看完整版本: 基本上依照Youtube去寫保力加通道AFL,請問為何仍不成