code to at least one of multiple conditions

Forums ProRealTime English forum ProOrder support code to at least one of multiple conditions

Viewing 2 posts - 1 through 2 (of 2 total)
  • #128440

    I need code to trade if ALL three conditions are met, c1, c2 and c3 and AT LEAST one of rest, c4-c14.

    Currently:

    IF c1 AND c2 AND c3 OR c4 OR c5 OR c6 OR c7 OR c8 OR c9 OR c10 OR c11 OR c12 OR c13 OR c14 THEN
    BUY 1 CONTRACT AT MARKET

    Which not correct.

    IF c1 AND c2 AND c3 AND ANY OF (c4 OR c5 OR c6 OR c7 OR c8 OR c9 OR c10 OR c11 OR c12 OR c13 OR c14) THEN
    BUY 1 CONTRACT AT MARKET

    What is correct code for my added bold code to get result?

     

    Thank you

    #128442

    Your “c” conditions are boolean and return 1 if true. So a simple addition would do the trick:

     

Viewing 2 posts - 1 through 2 (of 2 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login