Mimicking "Power X Strategy" by Markus Heitkoetter

Joseph Patrick 18

Active member
Update 01/2021: @cos251 just put out an indicator called RSM as a replica of the Power X Strategy for ThinkorSwim. Please check it out here.

Hi Everyone...Came upon an interesting read by a guy called Markus Heikoetter who is the author of the Power X Strategy. Looking to see if someone can help code something like this Power X Strategy for ThinkorSwim with the 3 lower studies color coded. Thanks!!

Here is a copy of that Power X Strategy PDF which shows all 3 lower studies combined and color coded: https://rockwell-files.s3.amazonaws.com/PXCompanionGuide2ndEd_cover.pdf

(If you scroll down and look thru pages 11 thru 25 you'll see what I mean...)

Examples:

QUdG8Ta.png

nBve7MW.png
 
Last edited:

Volatility Trading Range

VTR is a momentum indicator that shows if a stock is overbought or oversold based on its Weekly and Monthly average volatility trading range.

Download the indicator

cos251

Well-known member
Hi @Joseph Patrick 18 Please see the shared grid below. I will apologize up front, I made a few assumptions based on the shading. The shading is based on all 3 conditions being met rather than trying to line then up manually. I also combined the RSI and Stochastic since they are on the same range plot to save space. Hopefully this is along the lines of what you are looking for. Personally I think the shading required of all 3 conditions being met is better since it helps further confirm your trend a bit more definitively. At least that is my first reaction, could be wrong. Take a peak and see what you think. This is my first real attempt at a request from another member please provide constructive criticism/feedback. Thanks.

Edit* - I used this from your post above
#REQUIREMENTS - RSI Set to 7, EXPONENTIAL
# Stoch Slow 5(not14) and 3 WILDERS
# MACD 12,26,9 WEIGHTED

https://usethinkscript.com/threads/rsm-indicator-for-thinkorswim.5407/

y3R2opN.png
 
Last edited:

RickAns

Active member
Nice bit of coding, cos251. Thanks.

Here is my crude attempt at a label for the Target / Loss as mentioned in the .pdf

Code:
# Average Daily Range
def ADR = Average(High(period = AggregationPeriod.DAY) - Low(period = AggregationPeriod.DAY), 7);

AddLabel(yes, "Profit Target = +" +ADR * 3+ "", color.GREEN);
AddLabel(yes, " : Stop Loss =  -" +ADR * 1.5+ "", color.PINK);
AddLabel(yes, " : ADR daily = " +ADR+ "", color.GRAY);

plot ADRa = ADR; # uncheckmark the box in settings to hide this.

updated 11-29-20 below to show price as well. This is a label for the points of the current day.

def ADR = Average(High(period = AggregationPeriod.DAY) - Low(period = AggregationPeriod.DAY), 7);

AddLabel(yes, "Profit_X Target = +" +ADR * 3+ "", color.GREEN);
AddLabel(yes, "(" +(close(period = AggregationPeriod.DAY) + (ADR * 3))+ ")", color.GREEN);
AddLabel(yes, " : Stop_X Loss = -" +ADR * 1.5+ "", color.Pink);
AddLabel(yes, "(" +(close(period = AggregationPeriod.DAY) - (ADR * 1.5))+ ")", color.Pink);
#AddLabel(yes, " : ADR_X daily = " +ADR+ "", color.GRAY);


#plot ADRa = ADR; # uncheckmark in settings to hide
 
Last edited:

Joseph Patrick 18

Active member
@generic Hi, actually I don't know...it is just the generic TOS RSI study and I removed the 80 and 100 lines and then threw in a manual 50 line with help from a script from Ben10....

@cos251 Wow!! Thanks Cos that looks perfect! And the fact that you combined both the RSI and Stoch is perfect for the setup with my charts! Also thanks for having the upper sync with the lower studies!! That helps me out big time. Thanks so much for taking the time to help me out and I will let you know how I make out! Thank you so much.

@RickAns Thanks Rick appreciate your help with the labeling. I will give it a whirl. Thanks for taking the time out!
 
Last edited by a moderator:

cos251

Well-known member
Hi @Joseph Patrick 18 - thanks so much for the feedback. I'll try and review the pics a bit today and see if we can't make some tweaks to sync it up a bit better. I may even try and split the Stochastic/RSI just so we know we have everything configured properly. I'll get back to you on it.
 

RickAns

Active member
@cos251 , is there a way to adjust the gray of the candles? I would like them to stand out a little more against my dark background. Skimmed through your code and don't see an option. Maybe I have overlooked it. Really like what you have done with this.
 

Joseph Patrick 18

Active member
@cos251 , is there a way to adjust the gray of the candles? I would like them to stand out a little more against my dark background. Skimmed through your code and don't see an option. Maybe I have overlooked it. Really like what you have done with this.
Here you go just change this LINE 144 2nd line change Color.Dark_Grey to Color.WHITE ...or any color that you want.

 

cos251

Well-known member
Hi @Joseph Patrick 18 - I have taken a quick peek at the indicators vs your screenshots and to me it looks like the calculations are matching up, at least a quick glance. Please feel free to correct me here, I may have missed something. However, I think I know what the may be causing the skew. When I coded the shaded area I set it to POSITIVE_INFINITY and NEGATIVE_INFINITY. The reason for this was so that the area of the lower indicator could be shaded from top to bottom no matter the vertical expansion. I modified it to just shade 100 to 0 area and if you expand the lower indicator area the areas above 100 and below 0 are not shaded. See below for the alternate code and quick screen shot of the modification.

Code:
#AddCloud(if rsiGreen and stochGreen and macdGreen then Double.POSITIVE_INFINITY else Double.NaN, if rsiGreen and #stochGreen then Double.NEGATIVE_INFINITY else Double.NaN, Color.LIGHT_Green);
#AddCloud(if rsiRed and stochRed and macdRed then Double.POSITIVE_INFINITY else Double.NaN, if rsiRed and stochRed then #Double.NEGATIVE_INFINITY else Double.NaN, Color.LIGHT_RED);
AddCloud(if rsiGreen and stochGreen and macdGreen then 100 else Double.NaN, if rsiGreen and stochGreen then 0 else Double.NaN, Color.LIGHT_Green);
AddCloud(if rsiRed and stochRed and macdRed then 100 else Double.NaN, if rsiRed and stochRed then 0 else Double.NaN, Color.LIGHT_RED);

Take a peek and let me know if you concur. Otherwise we can keep digging. The top indicator (w/ shaded area) has the modified shaded area code to only shade 100 to 0. The lower one shades everything from top to bottom no mater the vertical shrink or expansion of the range plot. I hope this makes sense.

0TMCr6Y.png
 

New Indicator: Buy the Dip

Check out our Buy the Dip indicator and see how it can help you find profitable swing trading ideas. Scanner, watchlist columns, and add-ons are included.

Download the indicator

Similar threads

Top