How to avoid buy signal above 70 with param and sell below 30 with param urgent

_SECTION_BEGIN("stochrsi cross");
Arrows = ParamToggle( "Buy/Sell Arrows", "No|Yes", 1 );
RSI_Length = Param( "RSI Length", 13, 1, 250, 1, 1 );
Stoc_Length = Param( "Stocastic Length", 8, 1, 250, 1, 1 );
WMA_Length = Param( "WMA Length", 6, 1, 40, 1, 1 );
BullSig = BearSig = Trigger = 0;

Value1 = RSIa( C, RSI_Length ) - LLV( RSIa( C, RSI_Length ), Stoc_Length );
Value2 = HHV( RSIa( C, RSI_Length ), Stoc_Length ) - LLV( RSIa( C, RSI_Length ), Stoc_Length );
Value3 = Nz( Value1 / Value2 );
Value4 = 2 * ( WMA( Value3, WMA_Length ) -0.5 );
Trigger = Ref( Value4, -1 );

BullSig = IIf( Cross( Value4, Trigger  ), True, False );
BearSig = IIf( Cross( Trigger, Value4  ), True, False );

Buy= BullSig;
Sell= BearSig;

Plot( Value4, "StocRSI", colorLightBlue );
Plot( Trigger, "Trigger", colorRed );
Plot( 0 , "", colorWhite, styleDashed );

if ( Arrows )
    PlotShapes( shapeUpArrow*BullSig, colorBrightGreen );
    PlotShapes( shapeDownArrow*BearSig, colorRed );


If your question is "urgent" as stated in the subject line, you may want to take a little more time to explain what you're trying to achieve and how your current solution is falling short. Forum members are more likely to pass over posts where they have to guess what the OP wants.


@jiten02, by the way, this is a duplicate of How to change level in 0 -- 50 -- 100 and ignore buy signal above overbought zone and sell signal below oversold zone.

Please, be sure in the future to AVOID duplicating posts and continue the discussion in the original thread.


i know sir but i am new to use this forum i got one solution and another i mention in new post

You should properly acknowledge @beppe's efforts and response to your all URGENT queries
especially when you state that you got one solution in that thread.
so far no reply from you there.

That is no excuse even if you are new to the forum.

I gain nothing from this post, but next time your URGENT queries will all go unanswered indefinitely bcos you failed to respect other's time and efforts.


Wow, what's with the attitude! People are trying to help you! Maybe this forum that TJ kindly provides is not for you...

1 Like