if(Close[0] > Position.AvgPrice + 50 * TickSize)
I know that this will test to see if price is above +50 ticks THEN will do whatever code is underneath...in the thread I got it from, it essentially set a stop loss with about 30 ticks at that point.
However, I have a couple questions.
1) Can I use something more immediate than Close[0]? Can I use "Bid[0]" or something similar?
2) What if I have 2 or 3 of the if statements above...what keeps the condition from actually moving the stop loss backwards as the condition changes?
IE
the example above moves to 30 ticks...but what if during that time...Close[0] moves back below 50 ticks...if I put one at Close{0} > 30 (put stop loss at +15)...NOW this one is true...will it reset my stop loss now that the +50 is no longer true?
How should I work around that? Let's say at entry I set a stop loss at 15 ticks back. At +10 I set my stop loss 5 ticks back from entry. At 20 ticks I set my stop loss at 5 ticks from entry...etc. It's not always the same amount, nor is it necessarily that consistent to use the SetTrailStop().
Comment