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....
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by quantismo, 04-17-2024, 05:13 PM
    3 responses
    25 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by ScottWalsh, 04-16-2024, 04:29 PM
    7 responses
    34 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by cls71, Today, 04:45 AM
    0 responses
    5 views
    0 likes
    Last Post cls71
    by cls71
     
    Started by mjairg, 07-20-2023, 11:57 PM
    3 responses
    214 views
    1 like
    Last Post PaulMohn  
    Started by TheWhiteDragon, 01-21-2019, 12:44 PM
    4 responses
    547 views
    0 likes
    Last Post PaulMohn  
    Working...
    X