admin管理员组文章数量:1022864
Is it possible to have a Buy signal when the OBV crosses my Bottom line (Green Line) which stays in the same position. The Buy signals seem to only show up where the OBV is at number 0. enter image description here
TopLevel = 50000; // Static upper threshold
BottomLevel = -50000; // Static lower threshold
Top1 = 40000;
Bottom1 = -40000;
obvValue = OBV();
Buffer = 500; // A buffer for noise filtering (adjustable value)
Plot(TopLevel, "Top Static Line", colorRed, styleLine | styleNoLine | styleNoTitle);
Plot(BottomLevel, "Bottom Static Line", colorGreen, styleLine | styleNoLine | styleNoTitle);
Plot(obvValue, "OBV", colorBlue, styleLine | styleOwnScale | styleThick); // Plot OBV line for debugging
Plot(Top1, "Top Static Line", colorRed, styleLine | styleThick | styleNoTitle);
Plot(Bottom1, "Bottom Static Line", colorGreen, styleLine | styleThick | styleNoTitle);
BuySignal = Cross(obvValue, Bottom1 + Buffer) AND obvValue < Bottom1 - Buffer;
SellSignal = Cross(Top1 - Buffer, obvValue) AND obvValue > Top1 + Buffer;
Plot( IIf(BuySignal, obvValue, Null), "Buy Signal", colorGreen, styleHistogram | styleNoTitle );
Plot( IIf(SellSignal, obvValue, Null), "Sell Signal", colorRed, styleHistogram | styleNoTitle );
Plot(obvValue, "Debug OBV", colorYellow, styleLine | styleOwnScale | styleDashed);
Title = EncodeColor(colorWhite) + "OBV: " + WriteVal(obvValue, 1.2) +
" | TopLevel: " + WriteVal(TopLevel, 1.2) +
" | BottomLevel: " + WriteVal(BottomLevel, 1.2);
Is it possible to have a Buy signal when the OBV crosses my Bottom line (Green Line) which stays in the same position. The Buy signals seem to only show up where the OBV is at number 0. enter image description here
TopLevel = 50000; // Static upper threshold
BottomLevel = -50000; // Static lower threshold
Top1 = 40000;
Bottom1 = -40000;
obvValue = OBV();
Buffer = 500; // A buffer for noise filtering (adjustable value)
Plot(TopLevel, "Top Static Line", colorRed, styleLine | styleNoLine | styleNoTitle);
Plot(BottomLevel, "Bottom Static Line", colorGreen, styleLine | styleNoLine | styleNoTitle);
Plot(obvValue, "OBV", colorBlue, styleLine | styleOwnScale | styleThick); // Plot OBV line for debugging
Plot(Top1, "Top Static Line", colorRed, styleLine | styleThick | styleNoTitle);
Plot(Bottom1, "Bottom Static Line", colorGreen, styleLine | styleThick | styleNoTitle);
BuySignal = Cross(obvValue, Bottom1 + Buffer) AND obvValue < Bottom1 - Buffer;
SellSignal = Cross(Top1 - Buffer, obvValue) AND obvValue > Top1 + Buffer;
Plot( IIf(BuySignal, obvValue, Null), "Buy Signal", colorGreen, styleHistogram | styleNoTitle );
Plot( IIf(SellSignal, obvValue, Null), "Sell Signal", colorRed, styleHistogram | styleNoTitle );
Plot(obvValue, "Debug OBV", colorYellow, styleLine | styleOwnScale | styleDashed);
Title = EncodeColor(colorWhite) + "OBV: " + WriteVal(obvValue, 1.2) +
" | TopLevel: " + WriteVal(TopLevel, 1.2) +
" | BottomLevel: " + WriteVal(BottomLevel, 1.2);
版权声明:本文标题:amibroker - Whatever I do the Buy signals just gravitate to OBV number 0 as shown in picture - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745575499a2156992.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论