Setting a conditional stop
Author: topcat77
Creation Date: 9/4/2009 2:53 PM
profile picture

topcat77

#1
I am using AroonUp as a simple pivot-point and I want this strategy to set a stop at just under Entryprice if a high pivot point shows ( that is when : [bar-1] has highest-high in 6 bars && [bar] has lower high than [bar-1] && bar[close] is less than h+l+c/3[bar-1]. The compiler doesn't like my code ( " Operator '&&' cannot be applied to operands of type 'int' and 'bool'.
I've tried writing three 'if' statements instead and that gets rejected too
I've searched for comparable examples

This is the code snippet:

CODE:
Please log in to see this code.


How do I code this correctly ? Thank You
profile picture

Eugene

#2
CODE:
Please log in to see this code.

This assigns a value to the series (=) while your intention was to compare (==).

P.S.
CODE:
Please log in to see this code.
profile picture

topcat77

#3
Eugene, Thank You
compiles and works well . . .AveragePriceC is neat too
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).