StockFetcher Forums · View by Author: (5 messages)  [ Display By: Date / Subject ]<< >> 
Public Filter List · Draw Gann Square of Nine (SQ9) Levels on Charts
manifestation
msg #149302
modified
10/7/2019 1:44:18 AM

Thanks for the comments. I have combined both scripts so that it could be used for both tops and bottoms.

Fetcher[// Input

Apply to symlist(AAPL,CHGG)
set{DigitMultiplier, 1} // Multiplying the price in case it's too small. Prefer by powers of 4
set{DegInc, 0.5} // The increment by which the angle increases. Default = 0.5 (90 deg)
set{MajorPoint, High 3 year high} // The starting top/bottom. May change to a specific number as well
set{TopOrBottom, -1} // -1 for Top, 1 for Bottom
Offset 9/30/2019 // This line is optional

// Output

set{MultipliedPoint, MajorPoint * DigitMultiplier}
set{PriceRoot, Pow(MultipliedPoint, 0.5)}
set{Deg1, DegInc * TopOrBottom}
set{Inc2, 2 * DegInc}
set{Inc3, 3 * DegInc}
set{Inc4, 4 * DegInc}
set{Inc5, 5 * DegInc}
set{Inc6, 6 * DegInc}
set{Deg2, Inc2 * TopOrBottom}
set{Deg3, Inc3 * TopOrBottom}
set{Deg4, Inc4 * TopOrBottom}
set{Deg5, Inc5 * TopOrBottom}
set{Deg6, Inc6 * TopOrBottom}
set{Step_90, PriceRoot + Deg1}
set{Step_180, PriceRoot + Deg2}
set{Step_270, PriceRoot + Deg3}
set{Step_360, PriceRoot + Deg4}
set{Step_450, PriceRoot + Deg5}
set{Step_540, PriceRoot + Deg6}
set{Level_90, Pow(Step_90, 2)}
set{Level_180, Pow(Step_180, 2)}
set{Level_270, Pow(Step_270, 2)}
set{Level_360, Pow(Step_360, 2)}
set{Level_450, Pow(Step_450, 2)}
set{Level_540, Pow(Step_540, 2)}
set{Level_0m, MultipliedPoint / DigitMultiplier}
set{Level_90m, Level_90 / DigitMultiplier}
set{Level_180m, Level_180 / DigitMultiplier}
set{Level_270m, Level_270 / DigitMultiplier}
set{Level_360m, Level_360 / DigitMultiplier}
set{Level_450m, Level_450 / DigitMultiplier}
set{Level_540m, Level_540 / DigitMultiplier}

Draw price line at Level_0m
Draw price line at Level_90m
Draw price line at Level_180m
Draw price line at Level_270m
Draw price line at Level_360m
Draw price line at Level_450m
Draw price line at Level_540m

set{Step_1, Close - 1}
set{Step_2, Pow(Step_1, 0.5)}
set{Step_3, Step_2 * 180}
set{Step_4, Step_3 + 135}
set{Step_5, Step_4 / 36}
set{Step_6, MOD(Step_5,10)}
set{SQ9_Degree, Step_6 * 36}

Draw SQ9_Degree
Draw SQ9_Degree line at 90
Draw SQ9_Degree line at 180
Draw SQ9_Degree line at 270

Chart-time is 2 years
Chart-size is huge
]



Public Filter List · Position Sizing plus Stop-loss and Take-profit Calculator
manifestation
msg #149301
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
]



Public Filter List · Position Sizing plus Stop-loss and Take-profit Calculator
manifestation
msg #149293
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
]



Public Filter List · Draw Gann Square of Nine (SQ9) Levels on Charts
manifestation
msg #149281
modified
10/4/2019 11:58:33 PM

If you don't know what Gann’s Square of Nine or Spiral Chart is, please search about it on the Internet. It is one of the most popular tools for Gann traders.

From Major Top:

Fetcher[// Input

Apply to symlist(AAPL)
set{DigitMultiplier, 1} // Multiplying the price in case if it is too small. Preferably by powers of 2
set{DegInc, 0.5} // The increment by which the angle increases. Don't tough it unless you are familiar with the SQ9
set{MajorPoint, High 5 year high * DigitMultiplier} // The reference top/bottom. You may change it to a specific number
Offset 9/30/2019 // This line is optional

// Output

set{PriceRoot, Pow(MajorPoint, 0.5)}
set{Deg1, DegInc}
set{Deg2, 2 * DegInc}
set{Deg3, 3 * DegInc}
set{Deg4, 4 * DegInc}
set{Deg5, 5 * DegInc}
set{Deg6, 6 * DegInc}
set{Step_90, PriceRoot - Deg1}
set{Step_180, PriceRoot - Deg2}
set{Step_270, PriceRoot - Deg3}
set{Step_360, PriceRoot - Deg4}
set{Step_450, PriceRoot - Deg5}
set{Step_540, PriceRoot - Deg6}
set{Level_90, Pow(Step_90, 2)}
set{Level_180, Pow(Step_180, 2)}
set{Level_270, Pow(Step_270, 2)}
set{Level_360, Pow(Step_360, 2)}
set{Level_450, Pow(Step_450, 2)}
set{Level_540, Pow(Step_540, 2)}
set{Level_0m, MajorPoint / DigitMultiplier}
set{Level_90m, Level_90 / DigitMultiplier}
set{Level_180m, Level_180 / DigitMultiplier}
set{Level_270m, Level_270 / DigitMultiplier}
set{Level_360m, Level_360 / DigitMultiplier}
set{Level_450m, Level_450 / DigitMultiplier}
set{Level_540m, Level_540 / DigitMultiplier}

Draw Level_0m on plot close
Draw Level_90m on plot close
Draw Level_180m on plot close
Draw Level_270m on plot close
Draw Level_360m on plot close
Draw Level_450m on plot close
Draw Level_540m on plot close

Chart-time is 2 years
Chart-size is huge
]



From Major Bottom:

Fetcher[// Input

Apply to symlist(SLV)
set{DigitMultiplier, 16} // Multiplying the price in case if it is too small. Preferably by the powers of 2.
set{DegInc, 0.5} // The increment by which the angle increases. Don't tough it unless you are familiar with the SQ9
set{MajorPoint, Low 5 year low * DigitMultiplier} // The reference top/bottom. You may change it to a specific number
Offset 9/30/2019 // This line is optional

// Output

set{PriceRoot, Pow(MajorPoint, 0.5)}
set{Deg1, DegInc}
set{Deg2, 2 * DegInc}
set{Deg3, 3 * DegInc}
set{Deg4, 4 * DegInc}
set{Deg5, 5 * DegInc}
set{Deg6, 6 * DegInc}
set{Step_90, PriceRoot + Deg1}
set{Step_180, PriceRoot + Deg2}
set{Step_270, PriceRoot + Deg3}
set{Step_360, PriceRoot + Deg4}
set{Step_450, PriceRoot + Deg5}
set{Step_540, PriceRoot + Deg6}
set{Level_90, Pow(Step_90, 2)}
set{Level_180, Pow(Step_180, 2)}
set{Level_270, Pow(Step_270, 2)}
set{Level_360, Pow(Step_360, 2)}
set{Level_450, Pow(Step_450, 2)}
set{Level_540, Pow(Step_540, 2)}
set{Level_0m, MajorPoint / DigitMultiplier}
set{Level_90m, Level_90 / DigitMultiplier}
set{Level_180m, Level_180 / DigitMultiplier}
set{Level_270m, Level_270 / DigitMultiplier}
set{Level_360m, Level_360 / DigitMultiplier}
set{Level_450m, Level_450 / DigitMultiplier}
set{Level_540m, Level_540 / DigitMultiplier}

Draw Level_0m on plot close
Draw Level_90m on plot close
Draw Level_180m on plot close
Draw Level_270m on plot close
Draw Level_360m on plot close
Draw Level_450m on plot close
Draw Level_540m on plot close

Chart-time is 2 years
Chart-size is huge
]



Public Filter List · The Boyd Hunt Method
manifestation
msg #149275
modified
10/3/2019 9:54:07 AM

Bullish:

Fetcher[
set{ROC10_Low, Donchian Lower Band(60,0) divided by Donchian Lower Band(60,10)}
set{ROC10_High, Donchian Upper Band(60,0) divided by Donchian Upper Band(60,10)}
set{Range10, Donchian Upper Band(10,0) minus Donchian Lower Band(10,0)}
Market is not ETF
Close is above 10
MA(20) is above MA(50) for the last 15 days
Close is above MA(50) for the last 15 days
Close is above MA(200)
Stochastic %D(20,3,3) is above 70
ROC10_High reached a new 20 day high within the last 40 days
ROC10_High crossed above 1.1 within the last 40 days
Bollinger Width(10,2) is below Range10
Aroon Up(20) is below 80
ROC(5) is above -11 within the last 20 days
Draw ind(^SPX, Stochastic %K(20,3,3))
Draw ind(^SPX, Stochastic %K(20,3,3)) line at 25
Draw ind(^SPX, Stochastic %K(20,3,3)) line at 75
Do not draw Bollinger Width(10,2)
Do not draw Donchian Channels(10,0)
Do not draw Stochastic %D(20,3,3)
Do not draw Aroon Down(20)
Do not draw ROC10_Low
Do not draw ROC10_High 4 week high
Do not draw ROC10_High
Do not draw Range10
Do not draw ROC(5)
Do not draw ROC10_High line at 1.1
]



Bearish

Fetcher[set{ROC10_Low, Donchian Lower Band(60,0) divided by Donchian Lower Band(60,10)}
set{ROC10_High, Donchian Upper Band(60,0) divided by Donchian Upper Band(60,10)}
set{Range10, Donchian Upper Band(10,0) minus Donchian Lower Band(10,0)}
Market is not ETF
Close is above 10
MA(20) is below MA(50) for the last 15 days
Close is below MA(50) for the last 15 days
Close is below MA(200)
Stochastic %D(20,3,3) is below 30
ROC10_Low reached a new 20 day low within the last 40 days
ROC10_Low crossed below 0.9 within the last 40 days
Bollinger Width(10,2) is below Range10
Aroon Down(20) is below 80
ROC(5) is below 11 within the last 20 days
Draw ind(^SPX, Stochastic %K(20,3,3))
Draw ind(^SPX, Stochastic %K(20,3,3)) line at 25
Draw ind(^SPX, Stochastic %K(20,3,3)) line at 75
Do not draw Bollinger Width(10,2)
Do not draw Donchian Channels(10,0)
Do not draw Stochastic %D(20,3,3)
Do not draw Aroon Down(20)
Do not draw ROC10_Low
Do not draw ROC10_Low 4 week low
Do not draw ROC10_High
Do not draw Range10
Do not draw ROC(5)
Do not draw ROC10_Low line at 0.9
]



StockFetcher Forums ·  · << >>

*** 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 2018 - 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