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 llanqui, Today, 03:53 AM
    0 responses
    6 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    10 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    15 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    11 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Yesterday, 07:51 PM
    0 responses
    14 views
    0 likes
    Last Post strategist007  
    Working...
    X