Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

|| condition

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    || condition

    Hello,

    when I do in my coding

    (Stochastics(BarsArray[7],3,5,2).K[0] < 20
    || Stochastics(BarsArray[7],3,5,2).K[1] < 20
    || Stochastics(BarsArray[7],3,5,2).K[2] < 20

    && CrossAbove(Stochastics(BarsArray[7],3, 5, 2).K, Stochastics(BarsArray[7],3, 5, 2).D, 3)

    &&Position.MarketPosition == MarketPosition.Flat

    and other conditions..............

    for having the stochKcrossD within the last 3 bars AND this together with BarsArray[7],3,5,2).K[0] < 20 within the last 3 bars I have to add the "Or" condition.

    But I get a lot of entries, how can I avoid this?

    Thanks
    Tony

    #2
    Hi Tony, you would need to debug your conditions to exactly understand when they would trigger, then could think of a cure for eliminating some entries, you could for example shorten the lookback period to make the conditions 'tighter' here, so for example going to a 2 bars lookback for both condition parts instead of a 3 bar one. That should allow a signal to be harder generated....

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    68 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    38 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    62 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    62 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X