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 lightsun47, Today, 03:51 PM
    0 responses
    2 views
    0 likes
    Last Post lightsun47  
    Started by 00nevest, Today, 02:27 PM
    1 response
    8 views
    0 likes
    Last Post 00nevest  
    Started by futtrader, 04-21-2024, 01:50 AM
    4 responses
    41 views
    0 likes
    Last Post futtrader  
    Started by Option Whisperer, Today, 09:55 AM
    1 response
    13 views
    0 likes
    Last Post bltdavid  
    Started by port119, Today, 02:43 PM
    0 responses
    8 views
    0 likes
    Last Post port119
    by port119
     
    Working...
    X