Fixed Percent Stop Loss & Take Profit % - For Study Scripts

Fixed Percent Stop Loss & Take Profit % - { FOR STUDY SCRIPTS! }

A neat example of how to set up Fixed Stops and Take Profit as a percent of the entry price - This is for setting Alerts within your own Study Script for when either your SL or TP get hit.
Yup, that's about it!

You can ignore the actual entry/exit orders - they're based on a simple MA cross and are therefore NOT relevant, NOT profitable and NOT recommended!

You should be using this code as a way of adding Stops and Takes to your own scripts - hope it helps!

Set your "Open Long/Short" Alerts to be triggered "Once per Bar Close" - Set your "SL/TP" Alerts to trigger "Once per Bar".


We wrote this with a bit of a rush on! ~ If you spot any mistakes/bugs just let us know and we'll get round to them asap!


Good Luck and Happy Trading!
הסר מסקריפטים מועדפים הוסף לסקריפטים מועדפים
> Full Access on our website. 7-Day Free Trial. Crypto Tipster & Crypto Scalper Strategies. Stunning Past Performance


As usual u r the best excellent work..keep it up..
+2 השב
@Pollard, Thanks! That means a lot! We've been working hard recently trying to improve our products and services, including writing this code! Thought it was too valuable for fellow Pine coders to keep under lock and key!
Hi mate thanks for this! Do you also have an example for multiple take profit levels? e.g. 3 levels. Thanks!
+1 השב
HI, amazing script , is it possible to add mtf sir?
theCrypster Jannfaiz88
@Jannfaiz88, Not sure what you mean! Can you expand with some more details and we may be able to help. This is for adding a % SL/TP from your trades entry price
Jannfaiz88 theCrypster
@theCrypster, sir i ment is it possible to add multi time frame of moving average ?
+1 השב
Dear theCrypster
thank you for your work. I ask if you have a study for an example where you can see how to remove unnecessary transactions (long, long, long, short, double ...) so that it is (long, short, long, short)
theCrypster KirillNET
@KirillNET, We don't have a script for that (yet!) - You'd need to assign a value to your Long orders, and a value to your Short orders (Let's say 1 for Long and -1 for Short). Then check what the last signal was.

last_signal==1 ? : last_signal==-1 ? : na

Something like that ^ :)
It really depends on how the rest of your code is laid out as to how you can implement the Long/Short check.
Hope that is of some use - Regards
KirillNET theCrypster
Thank you so much
theCrypster theCrypster
@theCrypster, Oops sorry the code above didn't display properly!

That should read:

last_signal==1 ? (goShortCriteria) : last_signal==-1 ? (goLongCriteria) : na

That's better :)
בית סורק מניות סורק מט"ח סורק מטבעות-קריפטו יומן כלכלי איך זה עובד‏ תכונות גרף מחירון הפנה חבר חוקי הבית מרכז תמיכה כלים לאתרים וברוקרים יישומונים פתרונות גרפיים ספריית גרפים קלי משקל בלוג וחדשות טוויטר‏
פרופיל הגדרות פרופיל חשבון וחיוב הפנה חבר לשוניות התמיכה שלי מרכז תמיכה רעיונות שפורסמו עוקבים עוקב הודעות פרטיות צ'אט התנתק