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 Tim-c, Today, 02:10 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Taddypole, Today, 02:47 PM
    0 responses
    0 views
    0 likes
    Last Post Taddypole  
    Started by chbruno, 04-24-2024, 04:10 PM
    4 responses
    50 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Started by TraderG23, 12-08-2023, 07:56 AM
    10 responses
    399 views
    1 like
    Last Post beobast
    by beobast
     
    Started by lorem, Yesterday, 09:18 AM
    5 responses
    22 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X