Scale out with profit target
Author: techtrader007
Creation Date: 12/21/2010 10:36 AM
profile picture

techtrader007

#1
The script comes from the RSI scale out script
I would like to understand more where can I set my scale profittargets on the right place here.
I think I set this on the wrong place. Where do I have to place here my profittargets?
Thanks.
CODE:
Please log in to see this code.
profile picture

Cone

#2
If there already isn't one, we need to add a note to this script that the scale out percentages are not correct to exit 25% of the original Position in 4 lots. Depending which Position you sell (the original or newly created), you have to follow the split schedule as follows: (let's assume we're selling the newly-created positions, so the retainPercent parameter is the percentage of the original Position to keep.

1. Split #1, retain 75% (Example: if we had 200 shares, we keep 150 and sell 50).
2. Split #2, retain 66.67% (Example: We had 150 shares, so we keep 100 and sell 50).
3. Split #3, retain 50% (Example: We had 100 shares, so we keep 50 and sell 50).
4. Sell the last 50 shares.

So, when you want to exit equal lots, the retainPercent parameter changes for every split.

As for the question, you set your scale out targets where they're already specified in the script. Can you explain the trouble you're having with more detail?
profile picture

techtrader007

#3
p has no defintion for the EntryPrice.

For the beginning I am interested for the original
price to scale out in these four steps with different percentage targets.
For example I bought at 100
Scale out at 1% is 101 at 5% to 105 at 7% to 107 at 10% to 110.





profile picture

Cone

#4
1. It's Close[bar], not close[bar]
2. The variable p doesn't mean anything unless you assign it to something.

Anyway, you had the right idea, you just need to work on correcting obvious syntax errors.

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

techtrader007

#5
thanks. Silly for me.
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).