StockFetcher Forums · Public Filter List · Position Sizing plus Stop-loss and Take-profit Calculator<< >>Post Follow-up
manifestation
5 posts
msg #149293
Ignore manifestation
modified
10/6/2019 9:44:23 AM

Here is a position-sizing template for traders. It uses ATR(250) for calculation stop and target distances, as in the famous Turtles trading system, but you can easily change to something else that you use.

Bullish trade example:

Fetcher[//Input

Apply to Symlist(UE) // Ticker of stock(s) that you want to trade
set{EntryPrice, High 55 day high} // The price of entry. May change to a specific number, or other criteria for your entry signal
set{TradeDirection, 1} // 1 is long, -1 is short
set{StopLossInATR, 2} // How far away the stop loss is, in terms of ATR(250)
set{ProfitTargetInATR, 6} // How far away the profit target is, in terms of ATR(250)
set{AccountSize, 40000} // Total trading captial of the account
set{RiskPercentage, 0.01} // Percentage of Capital to risk
Offset 10/4/2019 // This line is optional

//Output

set{LossMargin, ATR(250) * StopLossInATR} // Change to other criteria if you don't like ATR(250)
set{ProfitMargin, ATR(250) * ProfitTargetInATR} // Change to other criteria if you don't like ATR(250)
set{LossMarginWithDirection, LossMargin * TradeDirection}
set{ProfitMarginWithDirection, ProfitMargin * TradeDirection}
set{StopPrice, EntryPrice - LossMarginWithDirection}
set{TargetPrice, EntryPrice + ProfitMarginWithDirection}
set{DollarAtRisk, AccountSize * RiskPercentage}
set{No_of_Shares_to_Trade, DollarAtRisk / LossMargin}
Draw EntryPrice on plot Close
Draw StopPrice on plot Close
Draw TargetPrice on plot Close
Draw No_of_Shares_to_Trade
Chart-time is 2 Years
Chart-size is huge
]



Bearish trade example:

Fetcher[Here is a position-sizing template for traders. It uses ATR(250) for calculation stop and target distances, as in the famous Turtles trading system, but you can easily change to something else that you use.

Fetcher[//Input

Apply to Symlist(CYBR) // Ticker of stock(s) that you want to trade
set{EntryPrice, Low 55 day low} // The price of entry. May change to a specific number, or other criteria for your entry signal
set{TradeDirection, -1} // 1 is long, -1 is short
set{StopLossInATR, 2} // How far away the stop loss is, in terms of ATR(250)
set{ProfitTargetInATR, 6} // How far away the profit target is, in terms of ATR(250)
set{AccountSize, 40000} // Total trading captial of the account
set{RiskPercentage, 0.01} // Percentage of Capital to risk
Offset 10/4/2019 // This line is optional

//Output

set{LossMargin, ATR(250) * StopLossInATR} // Change to other criteria if you don't like ATR(250)
set{ProfitMargin, ATR(250) * ProfitTargetInATR} // Change to other criteria if you don't like ATR(250)
set{LossMarginWithDirection, LossMargin * TradeDirection}
set{ProfitMarginWithDirection, ProfitMargin * TradeDirection}
set{StopPrice, EntryPrice - LossMarginWithDirection}
set{TargetPrice, EntryPrice + ProfitMarginWithDirection}
set{DollarAtRisk, AccountSize * RiskPercentage}
set{No_of_Shares_to_Trade, DollarAtRisk / LossMargin}
Draw EntryPrice on plot Close
Draw StopPrice on plot Close
Draw TargetPrice on plot Close
Draw No_of_Shares_to_Trade
Chart-time is 2 Years
Chart-size is huge
]



Cheese
1,374 posts
msg #149295
Ignore Cheese
modified
10/6/2019 12:12:58 PM

Thanks for your thoughts.
Some other posts also have had suggestions for entry and exit.
I would also look at MaxDD(250) /* maximum drawdown last 250 days */

xarlor
561 posts
msg #149300
Ignore xarlor
10/6/2019 9:52:38 PM

I like this, very good job! One change I would make is to have straight lines at your Entry, Stop, and Target. See below.

Draw price line at EntryPrice
Draw price line at StopPrice
Draw price line at TargetPrice

Fetcher[

//Input

Apply to Symlist(UE) // Ticker of stock(s) that you want to trade
set{EntryPrice, High 55 day high} // The price of entry. May change to a specific number, or other criteria for your entry signal
set{TradeDirection, 1} // 1 is long, -1 is short
set{StopLossInATR, 2} // How far away the stop loss is, in terms of ATR(250)
set{ProfitTargetInATR, 6} // How far away the profit target is, in terms of ATR(250)
set{AccountSize, 40000} // Total trading captial of the account
set{RiskPercentage, 0.01} // Percentage of Capital to risk
Offset 10/4/2019 // This line is optional

//Output

set{LossMargin, ATR(250) * StopLossInATR} // Change to other criteria if you don't like ATR(250)
set{ProfitMargin, ATR(250) * ProfitTargetInATR} // Change to other criteria if you don't like ATR(250)
set{LossMarginWithDirection, LossMargin * TradeDirection}
set{ProfitMarginWithDirection, ProfitMargin * TradeDirection}
set{StopPrice, EntryPrice - LossMarginWithDirection}
set{TargetPrice, EntryPrice + ProfitMarginWithDirection}
set{DollarAtRisk, AccountSize * RiskPercentage}
set{No_of_Shares_to_Trade, DollarAtRisk / LossMargin}
Draw price line at EntryPrice
Draw price line at StopPrice
Draw price line at TargetPrice
Draw No_of_Shares_to_Trade
Chart-time is 2 Years
Chart-size is huge
]



manifestation
5 posts
msg #149301
Ignore manifestation
10/7/2019 1:26:29 AM

Thank you for the suggestion. For similar reason, I also make the trading size into a flat line.

Fetcher[//Input

Apply to Symlist(UE) // Ticker of stock(s) that you want to trade
set{EntryPrice, High 55 day high} // The price of entry. May change to a specific number, or other criteria for your entry signal
set{TradeDirection, 1} // 1 is long, -1 is short
set{StopLossInATR, 2} // How far away the stop loss is, in terms of ATR(250)
set{ProfitTargetInATR, 6} // How far away the profit target is, in terms of ATR(250)
set{AccountSize, 40000} // Total trading captial of the account
set{RiskPercentage, 0.01} // Percentage of Capital to risk
Offset 10/4/2019 // This line is optional

//Output

set{LossMargin, ATR(250) * StopLossInATR} // Change to other criteria if you don't like ATR(250)
set{ProfitMargin, ATR(250) * ProfitTargetInATR} // Change to other criteria if you don't like ATR(250)
set{LossMarginWithDirection, LossMargin * TradeDirection}
set{ProfitMarginWithDirection, ProfitMargin * TradeDirection}
set{StopPrice, EntryPrice - LossMarginWithDirection}
set{TargetPrice, EntryPrice + ProfitMarginWithDirection}
set{DollarAtRisk, AccountSize * RiskPercentage}
set{No_of_Shares_to_Trade, DollarAtRisk / LossMargin}
Draw price line at EntryPrice
Draw price line at StopPrice
Draw price line at TargetPrice
Do not draw No_of_Shares_to_Trade
Draw No_of_Shares_to_Trade line at No_of_Shares_to_Trade
Chart-time is 2 Years
Chart-size is huge
]



jaiguru
1 posts
msg #149324
Ignore jaiguru
10/12/2019 10:03:54 AM

This is such a great filter, thanks!

StockFetcher Forums · Public Filter List · Position Sizing plus Stop-loss and Take-profit Calculator<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.