Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
May ask you about another thing, I have read about supertrend indicator from ninjatrader, I already ask many people about the logic behind that supertrend. I want to put it on my thinkorswim study. Coudl you tell me about the logic, because I can't figure it from the source code. I don't know about C# language.
You could click studies in TOS, choose edit studies ....
Click on VSA studies,
In the down side, there will be the properties, ..
from input criteria, slide it doew, then you could see color bar...
the default value is false, change it to true .
Thanks for the great study, C. I've been experimenting with it over the past few days and intend to make it a permanent part of my trading screen. I am confused about the display of Very High in the Close field of the banner, however. It seems to display Very High where it should display Very Low. High, Mid, and Down seem to work fine, as does Very High for a bar that closes at the top. I've noticed that it seems to default to Very High on the opening of a bar and will also display Very High as a bar grows to the downside or if the bar closes at its low. Here are the two sections of code that might account for this:
# Check if the close is in the Highs/Lows/Middle of the bar.
def x1 = if (close == low) then avgSpread else (spread / (close - low));
def isUpCloseBar = (x1 < 2);
def isDownCloseBar = (x1 > 2);
def isMidCloseBar = (x1 < 2.2 && x1 > 1.8);
def isVeryHighCloseBar = (x1 < 1.35);
##
AddChartLabel(trendText, concat("Close: ", if (isVeryHighCloseBar) then "Very High"
else if (isUpCloseBar) then "High"
else if (isMidCloseBar) then "Mid"
else if (isDownCloseBar) then "Down"
else "Very Low"), Color.white);
I double checked the original NT version. It has the same logic:
I do think this is a valid concern. If close = low for the bar, then x1 is set to the average spread. So if the average spread is < 1.35, the result will be a "very high" close bar, which makes no sense since the close = low. It would reason that this piece of code needs to be reworked a bit. Clearly, if close = low, then it should be "very low", not "very high". However, cases where close = low = high should be taken into consideration as well.
Thanks for the good find! The reason I started this tread is to have peer reviews like this.
Regards,
-C
“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
Thanks for your response, C. Will you have time to do a little code-tweaking on this issue? If not, I suppose I could try it myself but I'm not confident that the results will be satisfactory.