Portfolio Allocation (%): The percentage of your portfolio you're willing to risk on the trade. Stop Loss (%): The stop loss distance below the entry price. Taker Fee (%) and Maker Fee (%): The fees applied on entry and exit.
Calculations:
The script calculates the required "raw" leverage to risk 1% of your portfolio. It floors the computed leverage to an integer ("effectiveLeverage"). If the computed leverage is less than 1, it shows an error message (and suggests the maximum allocation for at least 1× leverage). Otherwise, it calculates the TP levels for target profits of 1.2%, 1.5%, and 2%, and an "Optimal TP" that nets a 1% profit after fees.
Display:
A table is drawn on the top right corner of your chart displaying the effective leverage, the TP levels, and an error message if applicable. Simply add this script as a new indicator in TradingView, and adjust the inputs as needed.
ברוח TradingView אמיתית, המחבר של הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יכולים להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אך שימוש חוזר בקוד זה בפרסומים כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.