Modify the default DMI indicator?

Brettser16

New member
hey I had a question I was wondering if there was a way to make an adjustment on the dmi study? what im looking for is just a line that is at the 20 % mark and then a separate script that would make the dmi study have a line across it at 25%? is that even possible?
Thanks for everything
Brett
 
Last edited by a moderator:

inthefutures

Active member
declare lower;
plot line20 = 20;
plot line25 = 25;


instrictions:
make a new study, copy above into study, then add it to your chart, then drag it so it is inside the DMI study
 

floydddd

Member
I swear to god I tried to follow Tom's example as outlined in post #9 here: https://usethinkscript.com/threads/ultimate-macd-indicator-for-thinkorswim.558/. For whatever reason, my brain won't let me translate it to DIPlus or DIMinus. Should be easy enough, given the simplicity of TOS's code for DIPlus:

Code:
#
# TD Ameritrade IP Company, Inc. (c) 2008-2021
#

declare lower;

input length = 14;
input averageType = AverageType.WILDERS;

plot "DI+" = DMI(length, averageType)."DI+";
"DI+".SetDefaultColor(GetColor(1));

Someone care to help out? Thanks!

p.s. i also studied the examples in Jim Shingler's github collection but my brain still refused to cooperate.
 

MerryDay

Well-known member
VIP
@floydddd All you have done is re-create the TOS standard indicator. Seeing as you re-created it, word for word. We can assume it works perfectly. Are you trying to do something different? The link you provided is for the MACD has nothing to do with the DI+, so I am very confused.
https://tlc.thinkorswim.com/center/reference/Tech-Indicators/studies-library/C-D/DIPlus
If you explain what you are trying to do and provide lots of marked-up screenshots, someone here may be able to help you.
How To Insert Images Into Your Post
HTH
 
Last edited:

floydddd

Member
MD: well, if you'd read my post with different eyes and/or comprehension, you'd see that there's a colon at the end of the line that comes before the code, indicating that what follows is lifted directly from TOS and is nothing more than that. and if you'd gone to post #9 in the link, you'd see that the code tom provides there was meant to be instructional as regards normalization, even if it uses MACD as the example. i didn't expect you to go to the link but, given the specificity of "post #9," i'd have expected you not to judge just by the title of that thread alone.

pics to follow ... though it should be obvious what i'm after: 0 to 100% for the range, as opposed to unbounded as in the TOS code appended above.
 

MerryDay

Well-known member
VIP
@floyddd A neat trick to refer to the exact link to a post in a thread is to click on the post#. That will put the post link in the URL that you can then copy and paste.
Otherwise linking to the top of the thread as you did, no one would know what you were not referring to the MACD indicator or that you wanted us to read through the thread. Or that you were referring to post#9.

Post#9 refers to normalizing a plot. One does that when you want to take two different indicators and 'normalize' one to the other. Which it doesn't sound like what you want to do because you haven't mentioned a 2nd indicator. Maybe you are trying to create an oscillator? I have no idea. You just have not given enough information.

When you post your screenshots, remember to mark them up with what you are looking for. Make sure to include one image with the whole chart because that lets us know all your settings. And then any close-ups.
HTH
 

floydddd

Member
you wrote: Otherwise linking to the top of the thread as you did, no one would know what you were not referring to the MACD indicator or that you wanted us to read through the thread. Or that you were referring to post#9.

well, yes, except for the very obvious fact that my original post on the matter referred specifically to post #9 and only post #9. good golly gee whiz! it's the 14th word in the first sentence!

meanwhile, back at the ranch, in the photo below, top version of DI is normal. second one has another indicator in the background, which forces 0 - 100% as a scale on the right. i'd love the number output reading to be b/ 0 and 100 as well.

normalization is still what i think i'm after, no 2nd indicator notwithstanding.

bigger picture reason i'm asking is so i can turn it into a watchlist column that reflects percentages instead of unbound numbers, which clearly doesn't call for another indicator.

RJMlj11.png
 
Last edited:

Similar threads

Top