davesaint86 725 posts msg #158441 - Ignore davesaint86 modified |
1/23/2022 1:18:03 PM
I added the two additional intra-day target profits.
Fetcher[apply to symlist(spy,sso,ddm,qqq,qld,uwm,amzn,dis,googl,aapl,fb,gs,ma)
draw keltner band(20,1.0)
draw keltner band(20,2.0)
draw keltner band(20,3.0)
draw ema(5)
draw ma(50)
draw ma(200)
draw ma(250)
draw rsi(14)
draw rsi(14) line at 50
draw rsi(14) line at 30
draw rsi(14) line at 70
draw macd(12,26,9)
and draw Slow Stochastic(14,3) Fast %K line at 20.00 and draw Slow Stochastic(14,3) Fast %K line at 80.00 and draw Slow Stochastic(14,3) Fast %K line at 50.00
and draw Slow Stochastic(14,3) line at 50
/*DETERMINE THE MAXIMUM AMOUNT YOU ARE WILLING TO LOSE*/
SET{ACCOUNTSIZE,100000}
SET{RISKLEVEL, ACCOUNTSIZE*0.010}
/*DETERMINE LIMIT ENTRY POINT*/
SET{LIMITENTRY, MIN(CLOSE, REVERSERSI(2,5))}
/* VAN THARP POSITION SIZING - SET THE STOP LOSS AND SHARE SIZE BASED ON LIMIT ENTRY AND AMOUNT WILLING TO LOSE*/
SET{2ATR, 2 * ATR(20)}
SET{STOPLOSS2ATR, LIMITENTRY - 2ATR}
/* Trailing Stop Loss - Adjusted Based On Price Movement*/
SET{1_5ATR, 1.5 * ATR(20)}
SET{TRAILSTOP1.5ATR, CLOSE + 1_5ATR}
draw price line at TRAILSTOP1.5ATR on plot price
/* Profit Target #1*/
SET{.45ATR_1, .45 * ATR(20)}
SET{PROFITTARGET.45_1, CLOSE + .45ATR_1}
draw price line at PROFITTARGET.45_1 on plot price
/* Profit Target #2*/
SET{.90ATR_2, .90 * ATR(20)}
SET{PROFITTARGET.90_2, CLOSE + .90ATR_2}
draw price line at PROFITTARGET.90_2 on plot price
/* Profit Target #3*/
SET{1.35ATR_3, 1.35 * ATR(20)}
SET{PROFITTARGET1.35_3, CLOSE + 1.35ATR_3}
draw price line at PROFITTARGET1.35_3 on plot price
/*DETERMINE THE NUMBER OF SHARES TO BE PURCHASED*/
SET{SHARESTOBUY1, RISKLEVEL/2ATR}
SET{SHARESTOBUY, ROUND(SHARESTOBUY1, 0)}
/*TOTAL AMOUNT OF EQUITY USED IN THIS TRADE*/
SET{POSITIONAMT, LIMITENTRY * SHARESTOBUY}
/*PERCENT OF TRADING CAPITAL USED IN THIS TRADE*/
SET{POSITIONPCT1, POSITIONAMT / ACCOUNTSIZE}
SET{POSITIONPCT, POSITIONPCT1 * 100}
/*DETERMINE THE REWARD-TO-RISK RATIO BASED ON THE PROFIT TARGET AT RSI(2) = 90*/
SET{REWARD1, REVERSERSI(2,90) - LIMITENTRY}
SET{REWARD, REWARD1 * SHARESTOBUY}
SET{R_R, REWARD / RISKLEVEL}
/*SET THE CRITERIA NECESSARY TO TRIGGER A TRADE*/
ADD COLUMN SEPARATOR
ADD COLUMN RSI(14)
ADD COLUMN MA(200)
ADD COLUMN MA(250)
ADD COLUMN ATR(20) {ATR(20)}
add column average day range (20){ADR%}
ADD COLUMN SEPARATOR
ADD COLUMN SHARESTOBUY {SHARES TO BUY}
ADD COLUMN LIMITENTRY {LIMIT ENTRY}
ADD COLUMN REVERSERSI(2,90) {PROFIT TARGET}
ADD COLUMN SEPARATOR
ADD COLUMN STOPLOSS2ATR {ESL-2.0_ATR}
Add COLUMN TRAILSTOP1.5ATR {TS-1.5_ATR}
ADD COLUMN PROFITTARGET.45_1 {PT-1}
ADD COLUMN PROFITTARGET.90_2 {PT-2}
ADD COLUMN PROFITTARGET1.35_3 {PT-3}
ADD COLUMN SEPARATOR
ADD COLUMN R_R {REWARD-TO-RISK}
ADD COLUMN POSITIONAMT {POSITION SIZE IN DOLLARS}
ADD COLUMN POSITIONPCT {PERCENT OF TRADING EQUITY}
ADD COLUMN SEPARATOR
ADD COLUMN ROC(252,1) {12 mth %}
ADD COLUMN ROC(126,1) {6 mth %}
ADD COLUMN ROC(63,1) {3 mth %}
ADD COLUMN ROC(21,1) {1 mth %}
SORT ON COLUMN 12 DESCENDING
DRAW PRICE LINE AT LIMITENTRY ON PLOT PRICE
DRAW PRICE LINE AT REVERSERSI(2,90) ON PLOT PRICE
CHART-TIME IS 160 days
]
|