@nir shahar, You can do Equivolume charts right in Thinkorswim: Hope this helps! Good Luck and Good Tradingby netarchitech - Trading Discussion
Hi, I am trying to get this scan to work. Despite my best efforts, I am unable to figure out how to properly resolve the portion of the code that is bold and italicized below: script isRegularFractal { input mode = 0; plot ret = if mode == 1 then high[4] < high[3] and high[3] < high[2] and high[2] > high[1] and high[1] > high[0] else if mode == -1 then low[4] > loby netarchitech - Trading Discussion
Hi, I'm trying to convert a large study into a workable scan. The portions which are proving difficult are the functions. Here is a sample: script isABCD { input _mode=0; input abc=0; input bcd=0; input d=0; input c=0; def _abc = abc >= 0.382 and abc <= 0.886; def _bcd = bcd >= 1.13 and bcd <= 2.618; def ret =_abc and _bcd and (if _mode ==by netarchitech - Trading Discussion
@RichieRick, AFAIK, thinkorswim does not provide custom aggregation periods. The list of available aggregation periods can be found here... Good Luck and Good Tradingby netarchitech - Trading Discussion
@styx, With regard to your first requests, try this: input magnitude = 3; input peak_spacer = 8; input valley_spacer = 8; # define and plot the most recent peak def peak = high >= Highest(high[1], magnitude) and high >= Highest(high[-magnitude], magnitude); def peakvalue = if BarNumber() < magnitude then Double.NaN else if peak then high else Double.NaN; #plot peakline =by netarchitech - Trading Discussion
@DennisW, Try this... def percentDLength = 3; def percentKLength = 14; def min_low = Lowest(low, percentKLength); def max_high = Highest(high, percentKLength); def rel_diff = close - (max_high + min_low) / 2; def diff = max_high - min_low; def avgrel = Average(Average(rel_diff, percentDLength), percentDLength); def avgdiff = Average(Average(diff, percentDLength), percentDLength)by netarchitech - Trading Discussion
@RichieRick, Try this: def averageTypeRSI = AverageType.WILDERS; def lengthRSI = 14; def NetChgAvg = MovingAverage(averageTypeRSI, close - close[1], lengthRSI); def TotChgAvg = MovingAverage(averageTypeRSI, AbsValue(close - close[1]), lengthRSI); def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0; plot RSI = 50 * (ChgRatio + 1); Hope this helpsby netarchitech - Trading Discussion
@jakesdad: #intepreted by vimes declare lower; input len = 7; #changed from the setting of 20 per the instructions of the original author def srsin; def value1 = close - open; #code in the article had the absvalue here but then it would never oscillate around 0 def value2 = high - low; def value3 = if value2 == 0 then 0 else value1 / value2; srsin = Sum(value3, len); plot srsi =by netarchitech - Trading Discussion
Hi Rigel, I have been studying the Fold help file intensively for the last couple of days. I am well acquainted with the examples, but I continue to refer to it on an ongoing basis. As for the two problems with my current code, apparently I foolishly thought the syntax issue would be flagged by the compiler and I will look further into the variable data situation. The name of the file isby netarchitech - Trading Discussion
Thank you, Rigel... I really appreciate your efforts to assist me... Unfortunately, despite numerous attempts to successfully convert the Tradestation code, it still doesn't work properly. With that said, I am thankful to have made some progress. I plugged in the code you forwarded and received no errors from the compiler, but the output was not what it should of been. As a result, I scoureby netarchitech - Trading Discussion
I'm trying to convert a Tradestation ELS into Thinkscript. Here is the Tradestation code: inputs: Length(20); vars: srsi(0), srsin(0), k(0); srsin = 0; For k = 0 to Length - 1 Begin Value1 = absvalue(close - open; Value2 = absvalue(high - low; If value2 = 0 then value3 = 0 Else Value3 = value1/value2; srsin = srsin + value3; End; srsi = srsin/length; plot1(0.38); plby netarchitech - Trading Discussion
Given my rather limited skills in terms of scripting/programming, I've been trying to construct a trade calculator. As a result, please find below what I have put together so far: input ATRlength = 10; # default length = 14 - can range anywhere from 6 to 21 def priceC = close; input averageType = AverageType.WILDERS; input ATRmultiplier = 1.50; # default multiplier = 2.0 - can range anywhby netarchitech - Trading Discussion
@ragingmoener, I believe the reason why your couldn't get your study to work in the scanners is because you are specifying more than one plot statement...if possible, remove all but one plot statement or condense the plot statements into one... Hope this helps P.S. - I couldn't get the study to work in a chartby netarchitech - Trading Discussion
Hi Rigel, Thank you very much... I really appreciate it! Best Regards, netarchitechby netarchitech - Trading Discussion
Hi, I'm interested in converting the following PineScript to Thinkscript: // Bill Williams Fractal Template // Coded By: Matthew Spencer // If you like this script or use it's code in one of yours, please donate. // PayPal: ma.spencer@gmx.com Bitcoin: 1foxypuyuoNp5n1LNCCCCmjZ4RAXntQ8X // Define our titby netarchitech - Trading Discussion
Taz43 - Try this: def n = 2; def fastLength = 12; def over_bought = 70; def price = close; def over_sold =30; def averageType = AverageType.WILDERS; def bar = barNumber(); def Diff = rsi(fastLength, over_bought, over_sold,close, averageType); def OverSold = over_Sold; def OverBought = over_Bought; def UpSignal = if diff crosses above OverSold then OverSold else Double.Nby netarchitech - Trading Discussion
Tai, A fellow scripter on another forum provided the answer: declare lower; def RSIDelta = RSI(14) - RSI(14)[9]; def RSIsma = simpleMovingAvg(rsi(3),3); plot plot1 = RSIDelta + RSIsma; plot plot2 = simpleMovingAvg(plot1,13); plot plot3 = simpleMovingAvg(plot1,33); Hope that helps. Pay it forward netarchitechby netarchitech - Trading Discussion
Hi Tai, I've been trying to come up with the thinkscript version of the Composite Index. There are a number of errors (highlighted in red), but here's what I have so far: declare lower; def length_rsi = 14; def length_momentum = 9; def price = close; def averageType = AverageType.WILDERS; def NetChgAvg = MovingAverage(averageType, price - price[1], length_rsi); def TotChgAvg = Mby netarchitech - Trading Discussion
Hi All, I've trying to incorporate Volume into my setup. As a result, I came across the following indicator. input period = AggregationPeriod.HOUR; def O = open(period = period); def H = high(period = period); def C = close(period = period); def L = low(period = period); def V = volume(period = period); def O1 = open(period = period); def H1 = high(period = period); def C1 = cloby netarchitech - Trading Discussion
Quoteelovemer simple things ... are the best indicators. Good point...With all the blinking lights and gadgetry, it can be difficult to see the forest for the trees...Information overload... For me...Price, Volume, a little VSA and a couple of homebaked "indicators" work pretty well, but I've been peeling the onion for years now to get to where I am as a trader/investor...by netarchitech - Trading Discussion
@devildriver6 - The thinkorswim.vmoptions file path is C:\Users\USER\AppData\Local\thinkorswim... Rename the thinkorswim.vmoptions file extension to thinkorswim.vmoptions.old before saving the new configuration Hope this helps...by netarchitech - Trading Discussion
@Elovemer - Thanks for the swift late night reply. I really appreciate it... I'll give it a go and report back if there's anything noteworthy to report, that isby netarchitech - Trading Discussion
@Elovemer - This is what I currently have in vmoptions: -Xmx8192m -Xms4096m -Djava.util.Arrays.useLegacyMergeSort=true -classpath/p launcher-first.jar -Dawt.useSystemAAFontSettings=lcd_hrgb -Dsun.net.http.allowRestrictedHeaders=true -XX:MaxPermSize=256m Any suggestions to further optimize these settings? Thanks in advanceby netarchitech - Trading Discussion
Tampman - Below is the code for one of the first thinkscripts I cobbled together for a bollinger squeeze... def price = close; def displace = 0; def length = 20; def length2 = 14; def factor = 1.5; input averageType = {default sMA, eMA}; def averageType2 = AverageType.WILDERS; def num_Dev_Up = 2.0; def num_Dev_Dn = -2.0; #def shift = factor * Average(TrueRange(high, closeby netarchitech - Trading Discussion
hmmm... maybe this... plot insideBar = high < high[1] and low > low[1]; def insideMatch = insideBar and (high == high[1] or low == low[1]); insideMatch.AssignPriceColor(if insideMatch then Color.CYAN else if insideBar then Color.MAGENTA else Color.CURRENT); AssignBackgroundColor(if insideMatch then Color.CYAN else if insideBar then Color.MAGENTA else Color.CURRENT); hope thisby netarchitech - Trading Discussion
Just wondering...are you inserting the thinkscript in a Custom Quote column? If so, try the following to see if it works: plot insideBar = high < high[1] and low > low[1]; def insideMatch = insideBar and (high == high[1] or low == low[1]); AssignPriceColor(if insideMatch then Color.CYAN else if insideBar then Color.MAGENTA else Color.CURRENT); AssignBackgroundColor(if insideMatby netarchitech - Trading Discussion
Maybe something like this... plot insideBar = high < high[1] and low > low[1]; insideBar.AssignValueColor(if insideBar then Color.LIGHT_GREEN else Color.BLACK); AssignBackgroundColor(if insideBar then Color.LIGHT_GREEN else Color.BLACK);by netarchitech - Trading Discussion
Hi Ralph53, How 'bout something like this? AddLabel(yes, if long then "GO LONG" else if short then "GO SHORT" else if exit then "EXIT TRADE" else "NO TRADE", if long then Color.UPTICK else if short then Color.DOWNTICK else if exit then Color.YELLOW else Color.GRAY); AddLabel(yes, "LONG STOP: " + STOPlong, if long then Colorby netarchitech - Trading Discussion
I agree with RichieRick...Admins please verify the authenticity of @lawrencevkim and @locantop... Last week it was spam, now it's a "invitation" to sign up for a what appears to be a bogus "thinkorswim" account on a questionable domain... RichieRick thankfully expressed concern here earlier and he was "invited" to click on a bogus link pointing to a Google Drivby netarchitech - Trading Discussion
Hi Ralph53, Try this: def x = close >= open; AddLabel(visible = yes, text = GetSymbol(), if x then Color.YELLOW else Color.DARK_RED); Hope this helps...by netarchitech - Trading Discussion