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);

本文标签: amibrokerWhatever I do the Buy signals just gravitate to OBV number 0 as shown in pictureStack Overflow