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.
Size:
Color:
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?
Size:
Color:
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.
Size:
Color:
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.
Size:
Color:
thanks. Silly for me.
Size:
Color: