jcseattle

Untitled

Jan 17th, 2018
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 48.69 KB | None | 0 0
  1. ------- Wednesday, January 17, 2018 -------
  2. 04:45 Nube: .
  3. 06:08 bladeaccount: Sorry if it's a newb question but is there a hotkey for creating alerts very quick to wherever you just click in the active trader window or the charts? like holding Alt whle clicking somewhere in the chart or active window
  4. 06:13 Nube: You mean set an alert at a certain price level?
  5. 06:16 bladeaccount: or a script to set like 5 alerts at the same time up like 5 points/ticks above all at the same time with one click? Like I want alerts at 5, 10, 15, 20, 25 etc..
  6. 06:22 Genoja: Any one familiar with the Zanger volume ratio whom has a sweet tos setup they’d be willing to share
  7. 06:25 harndog: Zanger: http://tos.mx/3FqTlM
  8. 06:26 harndog: blade - Do a platform tour with live support - my experience is TOS is weak in Alerts
  9. 06:27 Nube: You could script something then apply it as a study, but the alerts will be sounding almost all the time as price bounces back and forth across every 5th tick.
  10. 06:27 harndog: Idea - Create a script with horizontal line and alerts from crossabove, cross below
  11. 06:28 Genoja: Harn your the man I’ll take o look thanks
  12. 06:28 harndog: Contribute back into the room
  13. 06:28 Nube: Alert once, Nube. Duh.
  14. 06:30 Jake-Elwood: Just right click on the chart or on the active trader window and select Create Alert at the price level that you are at.
  15. 06:31 Hey-U: Aloha bladeaccount: Just RIGHT CLICK with your mouse and CREATE ALERT takes you to ALERT set-up! Lucky
  16. 06:31 Jake-Elwood: any script you'd write would mean that you would have to manually enter the price level
  17. 06:38 Nube: Jake, can set multiple at once when you use that?
  18. 06:46 RayK: Hi. My buffer is missing from 19:44 to 20:19 EDT yesterday (Jan 16). Can someone please PB it to me? Thanks in advance.
  19. 06:55 Jake-Elwood: NUBE, sure just set multiple alert statements with various offsets from the input price. works, right?
  20. 07:03 Nube: Sure does. Just always hoping for short cuts.
  21. 07:10 pdub1: mornin y'all, shizznet wrote this scan for me to be alerted when the high of the 1st candle was broken, i'm only scanning a tight group of about 40 stocks, and even tho several have broken the high of the 1st candle the scan returns nothing, take a look at wynn @8:38, that should of clearly popped into the scan - def start = 0930;
  22. def h = high;
  23. def c = close;
  24. def first_high = if secondsFromTime(start) == 0
  25. then high
  26. else first_high[1];
  27. plot scan = c crosses above first_high;
  28. 07:12 Joebone87: morning scripters... question for my option traders...cani use custom colums in the monitor tab... would like to see bid and ask or my some ratio of width of bid/ask : price
  29. 07:13 Joebone87: maybe some*
  30. 07:13 Nube: Use addlabel to debug. Check the value of first_high
  31. 07:15 pdub1: i do not know how to use addlabel to debug, could you show me and then i will know, or an example?
  32. 07:17 Nube: Addlabel(1, " First High:" + first_high, color.gray) ;
  33. 07:19 Nube: The other way, which super handy, is to just plot your variables instead.
  34. 07:21 pdub1: that addlabel came back with the correct first high on wynn
  35. 07:21 Mobius: pdub..What aggregation do you have the scan set for?
  36. 07:21 Nube: Excellent. Now check the plot. What is it plotting at that time?
  37. 07:22 Nube: Well now is the that a good question
  38. 07:22 Nube: *isn't
  39. 07:24 pdub1: umm, change scan to line in the plot line, would that do it?
  40. 07:26 pdub1: tried it, no line
  41. 07:27 Mobius: There's nothing wrong with the scan code posted above. So we know it's a PEBKAC error. Likely you've got the wrong aggregation checked so the bar isn't complete in the scanner
  42. 07:28 pdub1: ive got it on 1 min agg
  43. 07:28 Mobius: in the chart or the scnner
  44. 07:29 pdub1: scan is on 1 min, and chart is a 1 min chart
  45. 07:31 Mobius: keep looking you'll find it. The code isn't the problem
  46. 07:34 pdub1: can i get a hint? i mean keep looking for what?
  47. 07:34 Nube: Scan.setpaintingstrategy(paintingstrategy.boolean_arrow_up);
  48. 07:35 UpTheCreek: the way that code is written, it's looking for an event, not a change of state. depending on how you are using the scanner (static or dynamic) that code may not see an event. dynamic scans run only every 3 mins so if you are using a 1 min agg, the event is long gone by the time the scan happens
  49. 07:37 UpTheCreek: put the code on a chart and verify that it works there, then figure out how to make it work in the scanner
  50. 07:50 Shizznet: I didn't write that scan, btw.
  51. 07:51 codydog: anyone else having an issue with watchlists dropping saved symbols or reverting back to deleted symbols?
  52. 07:51 pdub1: oh u didn't, my apologies @shizznet
  53. 07:51 Rinder: Hi everyone. I'm trying to use a larger aggregation period in a study but it has gaps (usually over holidays). I've tried using IsNaN and other checks to have it pull in the previous value but it isn't working. Anyone have any advice?
  54. 07:52 Shizznet: Dirty feed. You get what you pay for. Sorry for not being helpful.
  55. 07:52 pdub1: maybe DMonkey did
  56. 07:52 Shizznet: Mobius, DM and Nube wrote you 3 diff types.
  57. 07:53 Shizznet: Bet you didn't save any of them.
  58. 07:53 pdub1: wow, i saved them all
  59. 07:54 Shizznet: Nooiice
  60. 07:54 Shizznet: Good stuff
  61. 07:54 pdub1: altho i don't remember the one from nube
  62. 07:54 Mobius: there's nothing wrong with the code
  63.  
  64. cross is an event - a moment in time. Whereas greater than or less than is a state. Change the code to < or > and it will pick up all stocks that have already closed above the first high
  65. 07:54 pdub1: i did save the one you posted on the strat using targets and stops also
  66. 07:55 Mobius: or below it.
  67. 07:55 Shizznet: Class in session, pdub1.
  68. 07:55 Mobius: pdub. Coding is all about precision. You get EXACTLY what you ask for from the scanner
  69. 07:56 Mobius: WYNN is in the list when you scan for all stocks where current price is greater than the opening high
  70. 07:56 UpTheCreek: rinder, I reported the bad data problem weeks ago after a platform update, they ack'ed it but have not fixed it. Make sure you are using isNaN in the correct way.
  71. 07:57 Shizznet: AND he gave you a signal.
  72. 07:57 pdub1: making current adjustments
  73. 08:00 pdub1: working now, ty very much @mobius, in my limited writing of script i have not gone over 'crosses' so i would have never caught that, ty for letting me know, i just would not have found that
  74. 08:00 Shizznet: Sorry for the repost but for lurkers/students following along, this is what was posted yesterday:
  75.  
  76. Mobius: First RTH Bar Range plotted
  77.  
  78. # Regular Trading Hours First Bar Range
  79. # Mobius
  80. # V01.11.03.2017
  81.  
  82. declare hide_on_daily;
  83.  
  84. def RTH = if getTime() = RegularTradingStart(getYYYYMMDD()) and
  85. secondsTillTime(1000) 0
  86. then 1
  87. else 0;
  88. def "RTH First Bar" = if SecondsTillTime(0930) == 0 and
  89. SecondsFromTime(0930) == 0
  90. then barNumber()
  91. else "RTH First Bar"[1];
  92. def "RTH First Bar High" = if barNumber() == HighestAll("RTH First Bar")
  93. then high
  94. else Double.NaN;
  95. def "RTH First Bar Low" = if barNumber() == HighestAll("RTH First Bar")
  96. then low
  97. else Double.NaN;
  98. plot "First Bar High" = if RTH and
  99. barNumber() = HighestAll("RTH First Bar")
  100. then HighestAll("RTH First Bar High")
  101. else Double.NaN;
  102. "First Bar High".SetDefaultColor(Color.GREEN);
  103. "First Bar High".HideBubble();
  104. "First Bar High".HideTitle();
  105. plot "First Bar Low" = if RTH and
  106. barNumber() = HighestAll("RTH First Bar")
  107. then HighestAll("RTH First Bar Low")
  108. else Double.NaN;
  109. "First Bar Low".SetDefaultColor(Color.RED);
  110. "First Bar Low".HideBubble();
  111. "First Bar Low".HideTitle();
  112. AddCloud("First Bar Low", "First Bar High", Color.DARK_GRAY, Color.DARK_GRAY);
  113. # End Code First Bar Range
  114.  
  115. DMonkey: pdub...
  116. def start = 0930;
  117. def h = high;
  118. def c = close;
  119. def first_high = if secondsFromTime(start) == 0
  120. then high
  121. else first_high[1];
  122. plot scan = c crosses above first_high;
  123.  
  124. Nube: Plot firsthigh = if getsecondsfromtime(0930) 0 and getsecondstilltime(0931) = 0 then high else firsthigh[1];
  125. 08:02 pdub1: it was from DMonkey then...
  126. 08:03 pdub1: and i learned that the scans can be dynamic or static
  127. 08:03 UpTheCreek: you are dropping operators with that paste, shiz
  128. 08:04 Mobius: pdub.. Time for you to read the manual and go through the tutorials. You would benefit from doing so and so would we.
  129. 08:04 UpTheCreek: I see very little value in setting the scanner for 1m aggs unless you are doing manual scans
  130. 08:05 AlphaInvestor: ^^ good point - no reason to set it less that 3 minutes
  131. 08:05 Nube: How is it thay software can't figure out how to not drop operators ib the copy and paste procedure
  132. 08:06 Nube: How is it that I never learned to spell?
  133. 08:06 james4371: Would someone be able to help me out with this watchlist code please? I'm trying to have an alert triggered when the 8 ema crosses the 34 ema on a symbol in my watchlist. The visual portion is functioning properly but the alerts are not.
  134. 08:06 james4371: def ema8 = MovAvgExponential( Length = 8 );
  135. def ema34 = MovAvgExponential( Length = 34 );
  136. def data = if ema8 > ema34 then 1 else if ema8 < ema34 then -1 else 0;
  137.  
  138. assignbackgroundcolor(if data == 1 then color.GREEN else if data == -1 then color.RED else color.YELLOW );
  139.  
  140. plot output = data;
  141. output.assignvaluecolor( color.black );
  142.  
  143. AddLabel( yes, if ema8 > ema34 then "^" else if ema8 < ema34 then "v" else "=", color.black );
  144.  
  145. alert( Crosses( ema8, ema34, CrossingDirection.ANY ), Concat(GetSymbolPart(), " 8/34 EMA cross!"), Alert.BAR, Sound.Chimes );
  146. 08:06 UpTheCreek: different representtions of the same character. we should all go back to longhand
  147. 08:07 Mobius: james Watchlists will not signal alerts
  148. 08:07 james4371: That would explain it LOL.
  149. 08:08 Mobius: You can make it a Dynamic Watchlist and then turn alerts on
  150. 08:08 james4371: How would I do that?
  151. 08:08 Shizznet: oh wow
  152. 08:10 Mobius: Scan your static watchlist for the same condition you want the alert for. Save the scan and then set alert on for that scan and pull that scan up into a watchlist
  153. 08:10 pdub1: ok, i was just looking up words in reference as needed, but i will go through the manual and tutorials asap, I will report back to duty when finished - thanks again and see you soon
  154. 08:10 james4371: I'll have to try that, pretty new to TOS here, thanks.
  155. 08:11 Mobius: The Watchlist will populate with the stocks as the condition becomes true and an alert with email and sms will be sent if you have those features turned on in your setting
  156. 08:11 avital2473: Alpha, how close are you to Rolling IV script release,if you want to ?
  157. 08:12 AlphaInvestor: Avit - haven't started writing it, so it is far from ready
  158. 08:12 Mobius: Battle of the Bands already has IV bands for intraday
  159. 08:12 AlphaInvestor: Avit - it will be released when complete - Sharing is Caring
  160. 08:13 AlphaInvestor: Mobius - these would be more like expected move bands ... does BoB have that?
  161. 08:13 Mobius: Which as a matter f fact are about the same as Keltner Channel and abolutly no better
  162. 08:13 Mobius: Must need more coffee
  163. 08:14 AlphaInvestor: I got a pot of Sumatra ready, should I pour you a cup?
  164. 08:14 Shizznet: < Same
  165. 08:14 Mobius: Expected move is already on MyTrade as bands too
  166. 08:14 Shizznet: yw
  167. 08:14 avital2473: Thanks for update, I am doing somethinf similar ,but manualy adjust IV for 5-7 days chain,works not bad.
  168. 08:15 AlphaInvestor: Mobius - hmm - I know you have it as lines extending from Last Friday, but I didn't know you had bands that float over time too
  169. 08:15 avital2473: It is not a bands ,just lins brackets
  170. 08:16 RayK: Hi. My buffer is missing from 19:44 to 20:19 EDT yesterday (Jan 16). Can someone please PB it to me? Thanks in advance.
  171. 08:18 Mobius: Alpha.. Mabe what your planning is different. I love new ideas. Let me know when you've finished
  172. 08:18 twoshoes: Ray -- Jake's link from yesterday has the period you're looking for (in CST)
  173. 19:47 Jake-Elwood: /UF83NL9Q Didn't miss much.
  174. 08:18 Shizznet: RayK, all I got /RAw2AkDb
  175. 08:20 AlphaInvestor: Mobius - I will re-look at what you have on Battle of the Bands, and IV Bands before I spend too much time re-boiling the ocean
  176. 08:20 Mobius: There's a whole lot of people buying yesterdays dip. They must believe it was a good opportunity.
  177. 08:21 AlphaInvestor: I dipped my toes in yesterday - added some RISK DEFINED deltas
  178. 08:21 Shizznet: $ pouring out of BTC back into good earnings perhaps
  179. 08:21 RayK: Jake, Shizznet - thanks!
  180. 08:21 Shizznet: Bought DIA 275 C 31dte @ .05 yesterday
  181. 08:21 Shizznet: .09 now
  182. 08:22 hooter: Just curious... How/why are time segments of this forum sometimes missing?
  183. When this occurs with me, I usually exit forum and come back in and that missing segment is re-populated. What am I missing?
  184. 08:22 AlphaInvestor: up 80% sell sell sell
  185. 08:22 Shizznet: ^ Bingo.
  186. 08:22 Jake-Elwood: A fold in the space-time continum
  187. 08:23 Shizznet: hooter, everyone’s PC works differently. I sometimes come back to 3 days of buffer and other times I only have the last 2hrs.
  188. 08:23 Jake-Elwood: why would anyone ever leave this place?
  189. 08:23 Shizznet: Ha
  190. 08:28 Mobius: 4% rise between the last untested Pivot and yesterdays high. That's a good year by most standards.
  191. 08:30 Shizznet: I told ya yesterday was a higher low
  192. 08:30 Shizznet: lol
  193. 08:30 AlphaInvestor: Mobius - if the market was flat for the rest of the year I would not be terribly disappointed - I am up prrety good so far
  194. 08:31 DMonkey: Alpha....be a bit more optimistic.....lots of room to the downside....:)
  195. 08:34 AlphaInvestor: DMonkey - I am 85% long stock ... don't you be talkin' like dat
  196. 08:39 FrankB3: We all long in our hearts
  197. 08:42 Nube: Sane market behavior today: F took a pretty good hit on an earnings warning so the market still has some sanity.
  198. 08:42 Nube: Just think, this last move might be sane.
  199. 08:43 AlphaInvestor: fake news - all sanity has left the market
  200. 08:43 Mobius: I like uptrends and the market has been in one since it's inception. When the market goes parabolic at some point you have to take profit or mis the added profit those bubbles afford. That profit is what separates the truly successful from the average.
  201. 08:45 AlphaInvestor: Mobius - agreed ... the only question is when to do it without being too much of a market timer
  202. 08:45 FrankB3: Here is a chart of the SPX in the last 1000 years ::: .
  203. 08:48 Mobius: That's the rub isn't it Alpha.. My rule of thumb is 4 standard deviations. It's a very simple rule. Market goes that parabolic you know it will correct past what's reasonable so there will be a buying opportunity. But, you have to have a lot of patience to trade that way.
  204. 08:49 Shizznet: All FB trading groups are silent because most of them were louder than a chicken’s hen when crypto was trending.
  205. 08:50 Shizznet: /YM gonna show them what’s a real bull market
  206. 08:50 Mobius: Seems like BitCoin is losing a little of it's synthetic shine
  207. 08:52 Shizznet: A lot of broken hearts.
  208. 08:53 Nube: For comparison, a broad Europe Etf like VGK is only like 1 deviation above mean
  209. 08:54 hum: 50% alpha?
  210. 09:03 FrankB3: Mr. Scrits in trader_TV
  211. 09:06 FrankB3: Talking about Price Headly indicator,,,, but don,t give him credit
  212. 09:06 avital2473: Battle of Bands daily brackets are exellent,thank you Mobius.
  213. 09:17 rogerdt: does tos have a price to volume counter script?
  214. 09:24 DMonkey: roger look at volume profile....
  215. 09:28 anthony8186: Is the script for the Cam Indicator from the January issue of Technical Analysis of Stocks & Commodities available in this program
  216. 09:28 rogerdt: thank you
  217. 09:28 Nube: Yes, in fact I've seen more than one CAM floating around.
  218. 09:29 anthony8186: Thx
  219. 09:37 enerfax: is there a way to get a chart on spy using only bats prices?
  220. 10:05 Nube: Price is going to figure out how to go concave and all our charts are going to have to go backward in time as price increases.
  221. 10:06 Nube: Before this bull market is over, Mobius might have wished he sold that AAPL a year or two ago.
  222. 10:14 Nube: Or it's bumping it's head right here.
  223. 10:15 Shizznet: Double top
  224. 10:15 Shizznet: or ignore me. Pick your poison.
  225. 10:17 beergas: S&P5 vs Earnings Revisions Ratio is sky high back to '85
  226. 10:19 beergas: AAPL 20k new US jobs & campus
  227. 10:26 FrankB3: I like old Price H. ::: he is the only one I know who says to look at a options chart. This diagonal is priced at a -.17 will try to get a credit of +.35,, GTC http://tos.mx/YbGvjC
  228. 10:29 AlphaInvestor: Without also showing the price of the underlying and the IV of the underlying an Options price chart is worthless ... just my 2 cents
  229. 10:31 FrankB3: worth more than .02
  230. 10:32 AlphaInvestor: that was 2 cents CDN$ too, which makes it worth even less
  231. 10:32 FrankB3: ha
  232. 10:34 MrLayden: who in here knows if the premarket scanner picks up after hour movement in volume, just spoke with someone at tarde desk and they told me, premarket scanners dont pick up volume or percent change, is that true?
  233. 10:35 MrLayden: trade*
  234. 10:40 Nube: No, tarde desk is proper use. Kidding, Desk. Kidding.
  235. 10:44 Nube: Regarding the scanner, premarket the issue seems to me to be data related much more than the scanner itself.
  236. 10:46 MrLayden: he said i can change it with codes in thinkscript, sence the scan the criteria i have in my scan is not reading accurately, is what i understood from the conversation
  237. 10:51 AlphaInvestor: Bull Market - news of your early demise has been greatly exaggerated
  238. 10:55 Nube: Yeah, some of the built in scans aren't so hot premarket. The premarket movers are whatever it's called seems to be great though. As for scripting your own, yep, that absolutely can be done.
  239. 11:00 FrankB3: AI:: when the bitcoin falls will you hear a sound ?????
  240. 11:01 AlphaInvestor: Not in my portfolio you won't
  241. 11:02 FrankB3: Perhaps /GC will give us a clue
  242. 11:04 FrankB3: You may hear two crashes,,, at the same time,,, bitcoin and the SPX ?????
  243. 11:09 mattys: how can i make this study be 20 days, not just 20 periods?
  244. 11:09 mattys: def data = (Volume / VolumeAvg(20).VolAvg)-1;
  245. addlabel(yes, aspercent(Round(data,2)),if data < 0 then color.downtick else color.uptick);
  246.  
  247.  
  248. 11:12 FrankB3: You now buy Denver basketball seats with your bitcoin:: the only problem is that the 4 seats you purchased will be down to two,,, by the time they process the deal
  249. 11:12 AlphaInvestor: Frank - take this bitcoin chatter to the Worthless Electrons Chatroom
  250. 11:13 FrankB3: ha
  251. 11:18 Shizznet: lol
  252. 11:44 online: quick pop in -
  253. 11:45 online: does anyone have code for difference between yesterday's close and current ask for a watchlist column?
  254. 11:47 AlphaInvestor: plot diff = close[1]-Ask;
  255. 11:48 online: Alpha thank you
  256. 11:49 PonceDeLePwn: Hey all. Anyone have an idea on how to display two securities (specifically, the "last" ticks for spot and non-spot forex) on the same chart?
  257. 11:52 online: Alpha - do I need all the other lines?
  258. input Market_Open_Time = 0930;
  259. input Market_Close_Time = 1600;
  260. input showOnlyToday = YES;
  261.  
  262. def price = close[1];
  263. def Change = (close - ASK);
  264. plot diff = close[1]-Ask;
  265. 11:53 AlphaInvestor: Online - if you use a daily column, I believe that single line I gave you will do what you ask
  266. 11:53 online: thank you -- that is what I thought but wasn't sure
  267. 11:54 AlphaInvestor: all that time based stuff would be needed if you needed things from an intraday column
  268. 11:56 online: fok
  269. 11:56 online: ok
  270. 11:58 online: thanks - this is the result - anyway to get the column to show 2 decimal places, i.e., when .10 is shows .1
  271.  
  272. 12:01 AlphaInvestor: using addlabel with AsDollars as the fromatting
  273. 12:02 AlphaInvestor: but then it will sort alphabetically, not numerically
  274. 12:04 online: OK
  275. 12:40 rsf: HEY ALL.. Anyone have a warchlist script to search for symbolds with earning in the next 2 weeks? Thanks
  276. 12:42 reliantbay: any one here good at thinkscript?
  277. 12:42 AlphaInvestor: There are a bunch of folks who hang out here that are good at thinkScript
  278. 12:46 reliantbay: thanks @alphaInvestor
  279. 12:47 AlphaInvestor: Throw your question out, somebody will likely answer it (but not likely in the last 13 minutes of trading)
  280. 12:48 reliantbay: i need help plotting daily value of ttm_lrc . currently i can get the value of todays candle by just calling TTM_LRC(). but i want to plot it for the previous candles also.
  281. 12:52 reliantbay: so when i plot those it should be a curve not a straight line.
  282. 12:53 Shizznet: lol
  283. 12:54 Shizznet: You started asking for my LRC_Custom and then ended up asking for LRCBands
  284. 12:55 reliantbay: shizznet i am news here so i am not sure how your lrc_custom looks likes
  285. 12:55 reliantbay: new*
  286. 12:59 Shizznet: On mobile so I’ll be no help. BLT wrote it though
  287. 12:59 reliantbay: how do i find it ?
  288. 13:47 vix2: Doing some code for the symbol DJIA TIKI and .......... found that there is a DJIA Composite TIKI symbol too. Anyone know what the Composite TIKI represents versus regular TIKI? TY
  289. 13:48 UpTheCreek: probalby a composite value from all exchanges and not just NYSE
  290. 13:52 Mobius: TTM_LRC is nothing but an ordinary linear regression channel. for the current value you can use the TOS inertiaAll(close)
  291. 13:52 vix2: Makes sense. Looks like they vary in a wide range for values. Just wonder if one leads or which one represents more of the program trading aspect involving DJIA.
  292. 13:52 Mobius: for one bar back InertiaAll(close)[1]
  293. 13:55 BerretSO4: I'd like to create a study or script which shows simply the %Change from a specific point or price, then include that as a column in my watchlist. Any thoughts?
  294. 13:55 cachetada: Mobius,are u abe to explain the significance of the Div Signal (gree and red) for the Mobius MACD
  295. 14:03 Mobius: vix2 The composite is the DJIA plus about 35 more major companies
  296. 14:05 Mobius: cach... I don't know what your calling Mobius MACD
  297. 14:06 vix2: That is interesting to know. Dow 30 + ~35 more? Thank you. Will try to track down those exta listed companies.
  298. 14:07 Mobius: Berret - That's the same for any percentage calculated
  299.  
  300. (price1 - price2) / price1
  301.  
  302. 14:07 Mobius: vix2 google DJIA Composite
  303. 14:07 cachetada: Mobius MACD:
  304. 14:07 cachetada: declare lower;
  305.  
  306. input fastEMA = 13;
  307. input slowEMA = 21;
  308. input Smooth = 8;
  309.  
  310. def c = close;
  311. def h = high;
  312. def l = low;
  313.  
  314. def FSignal = (c * .15) + (.85 * ExpAverage(c, fastEMA)[1]);
  315. def SSignal = (c * .075) + (.925 * ExpAverage(c, slowEMA)[1]);
  316.  
  317. plot MACD = FSignal - SSignal;
  318. MACD.SetPaintingStrategy(PaintingStrategy.Line);
  319. MACD.SetLineWeight(2);
  320. MACD.AssignValueColor(if MACD < 0 and
  321. MACD < MACD[1]
  322. then Color.Red
  323. else if MACD < 0 and
  324. MACD > MACD[1]
  325. then Color.Cyan
  326. else if MACD > 0 and
  327. MACD > MACD[1]
  328. then Color.Green
  329. else Color.Lime);
  330.  
  331. plot MACDSL = ExpAverage(MACD, Smooth);
  332. MACDSL.SetPaintingStrategy(PaintingStrategy.Histogram);
  333. MACDSL.SetLineWeight(5);
  334. MACDSL.AssignValueColor(if MACDSL < 0 and
  335. MACDSL < MACDSL[1]
  336. then Color.Plum
  337. else if MACDSL < 0 and
  338. MACDSL > MACDSL[1]
  339. then Color.Green
  340. else if MACDSL > 0 and
  341. MACDSL > MACDSL[1]
  342. then Color.Blue
  343. else Color.Light_Red);
  344.  
  345. rec MACDh = CompoundValue(1, if MACD < 0
  346. then Double.NaN
  347. else if MACD crosses above 0
  348. then MACD
  349. else if MACD > 0 and
  350. MACD > MACDh[1]
  351. then MACD
  352. else MACDh[1], 0);
  353.  
  354. rec Valueh = CompoundValue(1, if MACD < 0
  355. then Double.NaN
  356. else if MACD crosses above 0
  357. then h
  358. else if MACD > 0 and
  359. h >Valueh[1]
  360. then h
  361. else Valueh[1], 0);
  362.  
  363. plot divSignal = if MACD > 0 and
  364. h > Valueh[1] and
  365. MACD < MACDh[1]
  366. then 0
  367. else Double.NaN;
  368. divSignal.SetPaintingStrategy(PaintingStrategy.Points);
  369. divSignal.SetLineWeight(4);
  370. divSignal.SetDefaultColor(Color.Green);
  371.  
  372. 14:08 Mobius: That's just a standard MACD
  373. 14:09 Shizznet: Another post w no header
  374. 14:09 Shizznet: Yeah but it’s your room so we get to blame you sometimes
  375. 14:09 pdub1: Mobius & UTC, this morning going over the scan that we changed from static to dynamic, even if it is dynamic does it still only self scan and populate every 3 min or does it continually scan?
  376. 14:09 cachetada: yes-and what is the Div Signal?
  377. 14:10 Mobius: cach.. It's right in the code
  378. plot divSignal = if MACD > 0 and
  379. h > Valueh[1] and
  380. MACD MACDh[1]
  381. then 0
  382. else Double.NaN;
  383. divSignal.SetPaintingStrategy(PaintingStrategy.Points);
  384. 14:10 UpTheCreek: dynamic = scans every ~3 min
  385. 14:11 Mobius: If the MACD is greater than 0 and the high is greater than value high from one bar ag and the MACD is greater than the last MACD the it signals
  386. 14:12 Mobius: geeze I wrote that thing about a decade ago. And you expect me to know what it does. OyVey
  387. 14:12 BerretSO4: Mobius, thank you - I'll fiddle with this and get myself more used to this system before follow-up question...
  388. 14:12 pdub1: ok, thanks, and I'm noticing that even tho the stock continues to stay above that 1st candle threshhold at some point, it falls 'off' the scan, is there a minimum amount of time it will stay on the scan and then go away? about 20 min after we had set the scan up, all of the symbols disappeared....
  389. 14:13 UpTheCreek: all depends on how it's coded
  390. 14:14 Mobius: pdub... That is not clear-cut. There's nothing in the code that drops a stock from the list and it doesn't follow any rule I've been able to find or surmise. The time they take to drop off the list seems to be random
  391. 14:15 UpTheCreek: scans have no memory, the scan condition either exists or it doesn't
  392. 14:15 UpTheCreek: doesn't it?
  393. 14:16 pdub1: thats my point, if the symbol continues to meet the scans condition it should stay in the scan, but it doesn't
  394. 14:16 Mobius: There may be a subroutine inside the JAVA code that closes an open object making them drop off the list
  395. 14:16 Mobius: No pdub that is inaccurate
  396. 14:17 UpTheCreek: < not a big user of dynamic scans, even less so now
  397. 14:17 Mobius: if the condition is a STATE and the scan stays TRUE they stay on the list
  398. 14:17 UpTheCreek: back to > all depends on how it's coded
  399. 14:18 Mobius: Remember anytime the "CROSSING" function is used that is a single BAR event. Anytime the greater than > of less than < function is used that creates a STATE
  400. 14:19 Mobius: My point UPC was that even using "CROSSING" the symbol does not appear for just 3 min and the fall off the list. It may stay on the list for up to an hour
  401. 14:20 UpTheCreek: interesting...
  402. 14:21 Mobius: yeah I thought so too. You'd think it'd fall off the list after the next cycle in the scanner
  403. 14:22 UpTheCreek: go figure
  404. 14:22 pdub1: ok, so i have it in a STATE with the > function and the symbold still do not not stay on the scan and eventually fall off
  405. 14:23 Mobius: pdub.. Only if they eventually are not > but become <.
  406. 14:23 Mobius: Otherwise they stay on the list
  407. 14:24 Mobius: If yours fall off, your just special
  408. 14:25 pdub1: BA was on the scan after we fixed it this morning, and about 20 min later fell off and is still not on the scan right now, I'm under the impression that all symbols within my scan group would still be on the scan list right now. If this is unexplainable I understand, just asking for a friend again
  409. 14:27 Mobius: You have the explanation already. Your really now special. There is a reason.
  410.  
  411. close > condition = On the list
  412. later close < condition = Off the list
  413. later still close > condition = On the list
  414. 14:31 pdub1: well i'm further confused, you tell me i'm special, meaning it is only happening to me, but then say there is a reason why it should be on the list
  415. 14:32 Mobius: Your special because your not paying attention. My reference to special is always those that rode the short little school bus
  416. 14:33 MTS1: pdub; in other words read your code again; do you have crossing, or do you have a condition that's either true or not?
  417. 14:34 Mobius: BA was greater than then below then above then below the opening bar high 5 time today
  418. 14:38 Mobius: pdub.. I've earned the right to my sarcam. And I never use it on those that
  419. 14:39 Mobius: are paying attention
  420. 14:39 Mobius: And I never use foul language
  421. 14:40 Mobius: As to teaching well that may be true. I leave that to your assesment
  422. 14:40 Mobius: assessment too
  423. 14:43 Shizznet: pdub one of my ongoing problems is reading replies too fast.
  424. 14:44 Shizznet: Things tend to go over my head too easily when I let that happen.
  425. 14:47 BerretSO4: OK, fundamental question about writing a study. I want to get the study to ask me for a number, so that it can calculate something based on other information. How do I get the study to ask the user for an input? Input does not seem to be working, but I may have the syntax wrong. Do you have an example of a line requesting a number from the user?
  426. 14:47 BerretSO4: Forgive my ignorance, I have had some minor programming experience, but not enough to hash through this yet.
  427. 14:49 Mobius: Berret - TOS isn't interactive in that fashion. The study can't pause for a user input. You have to write a set of variables that calculates whatever response is needed.
  428. 14:50 BerretSO4: So, everything must be automated - no user input function is available, like in C# or a similar language?
  429. 14:50 Shizznet: Whatcha got so far?
  430. 14:50 BerretSO4: This means I'd need to create a new study for each possible variable I'd 'input'
  431. 14:51 BerretSO4: Here's the gist, conceptually:
  432. 14:51 Mobius: Yes that's correct. You can enter a user input as a starting point or have a label pop when another input is needed by an out of bounds marker but you then have to open the UI window to write in a new value
  433. 14:52 BerretSO4: 1: Input "price1" from user
  434. 2: Get "price2" from variable LastPrice
  435. 3: Display (100(price1 - price2) / price1)%
  436. 14:52 pdub1: MT - yes I have it in the > condition
  437. 14:52 Mobius: How will you determine "price1"
  438. 14:53 Shizznet: You’re one of those
  439. 14:54 BerretSO4: I would make it up. It would be a hypothetical price based on a hypothetical purchase. I suppose I could call a variable for each stock and refer to a close price on a specific day, but that would make the process more complicated when all I'd need is the prompt "what price" or something like that.
  440. 14:54 BerretSO4: Shizznet, sorry I'm not a programmer. If this is annoying please feel free to ignore me.
  441. 14:55 Mobius: Berret.. Sure you can open the UI and enter a price each time you change to a new Chart
  442. 14:55 Shizznet: No I mean you’re so close if this is your first time. You’re one of the types that get it after reading through the manual once. imo
  443. 14:56 BerretSO4: Oh - thank you Shizznet.'
  444. 14:56 MTS1: Pat; Read the whole script and re-read the comments above; it's been explained. The version I saw after your discussion uses crosses above; if you changed somethign to > and that condition is still true (as are any other conditions) it would show in the results.
  445. 14:56 BerretSO4: this is my first time, yes. Mobius, maybe I should read more of the manual before asking further.
  446. 14:58 MTS1: *after your discussion w Mobius and it was fixed - RE: uses crosses above
  447. 14:58 MTS1: bbl
  448. 14:59 Mobius: Berret.. Here is an example of what you can do
  449. (Copy and paste the code below to a New Custom Study)
  450.  
  451. input UserValue = 100; #hint UserValue: Your value
  452.  
  453. def price = close[1]; # any variable you want
  454. def Percent = (price - UserValue) / price;
  455. 14:59 BerretSO4: oh #'ing is comments in this. OK.
  456. 15:00 Mobius: yes
  457. 15:00 AlphaInvestor: If uservalue is the base of comariosn ... that last line should be reversed
  458. 15:00 Mobius: I've got no idea Alpha
  459. 15:00 AlphaInvestor: dang fingers ... gunna have to send them in for for a tune-up
  460. 15:01 Mobius: is UserValue a prior value or a future value?
  461. 15:02 AlphaInvestor: good point Mobius - I read it one way, you read it another
  462. 15:02 Mobius: Is it the comparator or the comparison. Is it the left or the right
  463. 15:02 AlphaInvestor: serves me right for questioning Professor Yoda
  464. 15:02 Mobius: lol please
  465. 15:04 AlphaInvestor: Mobius - parabolic moves seem to beget continued parabolic moves
  466. 15:04 AlphaInvestor: But I did sell one mutual fund today, building up some extra Dry Powder
  467. 15:05 BerretSO4: prior value
  468. 15:05 BerretSO4: So, this defines the Percent Value
  469. 15:06 BerretSO4: now, I'm struggling to display it on the chart.
  470. 15:06 BerretSO4: As a simple output number, not as a line
  471. 15:06 AlphaInvestor: Look up AddLabel() in the manual
  472. 15:06 BerretSO4: I suppose it could be displayed as an arrow indicator with a text label
  473. 15:07 BerretSO4: OK, I saw that and it didn't work. I'll read more o nit.
  474. 15:07 AlphaInvestor: make sure you get all the parameters in there, and in the correct order - that is a common problem for some reason
  475. 15:07 UpTheCreek: be a whole lot easier on everybody if you could describe what youre trying to do
  476. 15:08 BerretSO4: UPTheCreek - sure, I can recopy it.
  477. 15:08 BerretSO4: I'd like to create a study or script which shows simply the %Change from a specific point or price, then include that as a column in my watchlist. Any thoughts?
  478. 15:08 BerretSO4: stated differently,
  479. 15:08 BerretSO4: 1: Input "price1" from user
  480. 2: Get "price2" from variable LastPrice
  481. 3: Display (100(price1 - price2) / price1)%
  482. 15:08 BerretSO4: those were my original notes on it - sorry for flooding.
  483. 15:09 Mobius: WatchList - Your going to need to consider a way to automate the input.
  484. 15:09 UpTheCreek: thought 1 - in a watchlist this is gonna be hard as you don't get to enter a value for a cell but a whole column
  485. 15:10 UpTheCreek: i.e. it's not a spreadsheet
  486. 15:10 BerretSO4: Right, that's a struggle. The study would need to be dynamic and customizable for each symbol, so that one column could display the study.
  487. 15:10 Mobius: Not gonna work Berret..
  488. 15:11 Shizznet: All good. We're learning
  489. 15:11 BerretSO4: Without the watchlist portion, displaying this on the chart is still useful as multiple studies, with one written for each symbol.
  490. 15:11 BerretSO4: though cumbersome, obviously.
  491. 15:11 Mobius: Yeah Berret.. That will be your only workable solution
  492. 15:11 UpTheCreek: you trying to get to P&L?
  493. 15:12 BerretSO4: essentially yes
  494. 15:12 BerretSO4: but without a TOS trade, and without having to use the PaperMoney platform
  495. 15:12 AlphaInvestor: your P&L without a TOS trade - that's easy - Zero
  496. 15:13 Mobius: You can use a Strategy. That shows a running hypothetical P&L
  497. 15:13 BerretSO4: Mobius, can you explain that in a little more detail?
  498. 15:13 BerretSO4: also Alpha, lol - point taken.
  499. 15:15 Mobius: Strategies are a TOS chart type. You can write automated buy and sell signals that TOS will track and give you a detail of time / price / entry and exit for a PL report
  500. 15:17 Nube: This sure would be a good place for someone with more guts than I to take a shot at selling
  501. 15:19 Mobius: Selling is easy. Shorting Not So Much
  502. 15:20 Nube: Accuracy is important. Short is what I meant. No wonder my scripts never produce what I think they should.
  503. 15:21 UpTheCreek: isn't it like the same as buying if you're standing on your head
  504. 15:21 BerretSO4: At this moment I can't even figure out how to tell TOS what to display on the label, after reading the definition of AddLabel. I'm going to have to pick this up another day.
  505. 15:22 Mobius: Berret.. You'll get it. Like any language - when you start dreaming in it you've got it
  506. 15:22 Nube: berret, quick sample
  507. 15:22 Jake-Elwood: thinkScript tutorials live here if you've missed them before : http://tlc.thinkorswim.com/center/howToTos/tutorials.html
  508. 15:22 Nube: Jakes, wins
  509. 15:27 Shizznet: AddLabel(
  510. if Close crosses Close[1] then 1 else 0, #Visible
  511. "What = " + Close, #Text
  512. Color.DARK_GRAY #Color
  513. );
  514. 15:27 Mobius: Everytime I see Jake-Elwood I get a craving for the old Saturday Night Live Shows. They're not the same anymore. At least not to me.
  515. 15:28 Jake-Elwood: indeed
  516. 15:28 AlphaInvestor: Bill Murray was on the last show, playing Bannon - he is one of the greats
  517. 15:28 Orange123: Hi, the function HighestAll will Returns the highest value of�data�for all bars in the chart. That includes the bars in the future. How do I get the highest bar in the past? I dont want to use the function Highest because I have to specify the look-back range.
  518. 15:28 Jake-Elwood: hard to recapture that magic
  519. 15:29 Mobius: Orange - Future bars haven't happened so it's always gonna be past highs
  520. 15:29 AlphaInvestor: Orange - just use Highestall if you are using price data. There is no High, Low, Open, or Close data in the future
  521. 15:29 BerretSO4: Thanks folks. I'll keep looking at this and you might see me again soon! Ha
  522. 15:30 AlphaInvestor: Orange - if it is something YOU calculated there may be future data
  523. 15:32 beergas: re shorting: 18:21 UpTheCreek: isn't it like the same as buying if you're standing on your head Yes, but if it's a large divy payer, then the coins fall outa your pockets rather than in.
  524. 15:33 Orange123: I am creating a study that will draw the retracement from the Highest High in the past.
  525. 15:33 Orange123: def hhh=highestall(high);
  526. plot BIAS_Retracement_Low2 = 100 * (low - HHH) / HHH;
  527. 15:33 Orange123: If I use HighestAll, it uses the highest bar in the chart
  528. 15:34 Jake-Elwood: yes, so what is your question?
  529. 15:34 Orange123: for example, for the data in 2011, it will consider today as the hightest high but that's not right
  530. 15:34 Orange123: for the drawing in 2011, it should only get the highest high up to 2011
  531. 15:35 Orange123: for bars in 2011, it should not consider 2018
  532. 15:35 Jake-Elwood: if today appears on the chart, it's eligible
  533. 15:36 Orange123: I am just drawing the "retracement" from the hightest up to the day of the bar
  534. 15:36 Jake-Elwood: if you want to limit it to 2011, you'd best put that limit in your study
  535. 15:36 Mobius: if you want to bracket a given period of time the you need to specify that
  536. 15:36 Mobius: Nice Jake
  537. 15:38 Mobius: Orange - Here is one method to do that
  538.  
  539. # High Low Close for Select Years Back
  540. # Mobius
  541. # V01.04.2011
  542. # Note: Chart data must be one year greater than the YearsBack period
  543.  
  544. Input YearsBack = 1;
  545.  
  546. def bar = barNumber();
  547. def ThisYear = GetYear() == GetLastYear();
  548. def y1fstBar = if GetYear() == GetLastYear() -(YearsBack + 1)
  549. then bar
  550. else y1fstBar[1];
  551. def y1LstBar = if getYear() == GetLastYear() -YearsBack
  552. then bar
  553. else y1LstBar[1];
  554. def y1H = if bar == y1fstBar
  555. then high
  556. else if bar >= y1fstBar and bar <= y1LstBar and high > y1H[1]
  557. then high
  558. else y1H[1];
  559. def y1Hbar = if high == y1H
  560. then bar
  561. else y1Hbar[1];
  562. def y1L = if bar == y1fstBar
  563. then low
  564. else if bar >= y1fstBar and bar <= y1LstBar and low < y1L[1]
  565. then low
  566. else y1L[1];
  567. def y1Lbar = if low == y1L
  568. then bar
  569. else y1Lbar[1];
  570. def y1c = if GetYear() == GetLastYear() -1
  571. then close[1]
  572. else y1c[1];
  573. plot yearHigh = if bar >= HighestAll(y1Hbar) then y1H else double.nan;
  574. yearHigh.SetStyle(Curve.Long_Dash);
  575. yearHigh.SetLineWeight(3);
  576. yearHigh.AssignValueColor(if close > yearHigh
  577. then color.red
  578. else color.green);
  579. plot yearLow = if bar >= HighestAll(y1Lbar) then y1L else double.nan;
  580. yearLow.SetStyle(Curve.Long_Dash);
  581. yearLow.SetLineWeight(3);
  582. yearLow.AssignValueColor(if close > yearLow
  583. then color.red
  584. else color.green);
  585. plot yearClose = if ThisYear then y1c else double.nan;
  586. yearClose.SetStyle(Curve.Long_Dash);
  587. yearClose.SetLineWeight(3);
  588. yearClose.AssignValueColor(if close > yearClose
  589. then color.red
  590. else color.green);
  591. # End Code - Past Years High Low Close
  592.  
  593.  
  594. 15:39 Orange123: Thank you. Let me try it.
  595. 15:39 Mobius: Here is another method
  596.  
  597. # Last Year
  598. # Mobius
  599. # Chat Room Request 03.05.2016
  600.  
  601. def Year_First = if GetYear() != GetYear()[1]
  602. then open
  603. else Year_First[1];
  604. plot YearOpen = if Year_First !=0 then Year_First else double.nan;
  605. YearOpen.SetStyle(Curve.Long_Dash);
  606. YearOpen.SetDefaultColor(Color.Cyan);
  607. addChartBubble(isNaN(close[3]) and !isNaN(close[4]), YearOpen, "2015", Color.Cyan, yes);
  608.  
  609. plot CloseYearPrev = highestAll(if isNaN(close[-1])
  610. then close(period = AggregationPeriod.Day)[252]
  611. else Double.NaN);
  612. CloseYearPrev.SetStyle(Curve.Long_Dash);
  613. CloseYearPrev.SetDefaultColor(Color.Yellow);
  614. addChartBubble(isNaN(close[3]) and !isNaN(close[4]), CloseYearPrev, "Last Year", Color.Yellow, yes);
  615.  
  616.  
  617. 15:40 AlphaInvestor: If you use the new Time Selector, and have the Expansion Area set to Zero ... I don't think it will see future bars ... but that would have to be tested
  618. 15:40 Mobius: Yeah GetTime() will use future bars
  619. 15:41 AlphaInvestor: I meant for Highestall(close) or some such
  620. 15:41 Mobius: HighestAll(barNumber()) will get the bar furthest to the right in the expansion area. I use it all the time
  621. 15:42 Mobius: For projections into the future
  622. 15:42 Mobius: Which as you know are always perfect. Yeah!
  623. 15:42 AlphaInvestor: That is why I said "and have the Expansion Area set to Zero"
  624. 15:46 beergas: Those many ZigZag studies were prone to issues @ future bars
  625. 15:47 AlphaInvestor: ZigZag - never heard of it
  626. 15:48 beergas: lol
  627. 15:55 Nube: ToS mobile appears to have something like setstyle(curve.dotted) that is different than the curve.points on desktop
  628. 15:56 Nube: It's closer to paintingstrategy_dashes, but it has that also
  629. 15:56 Nube: Anybody know if the Dotted and the Dashes?
  630. 15:56 Nube: *are the same thing?
  631. 15:58 Nube: Answered my own question, they aren't. Now we gotta figure out what they call that Dotted line so we can use it on desktop
  632. 16:01 beergas: fwiw Bull within Bull - in Q4 only Coke & Intel did not rise in Dow 30, Dow utils also down on higher interest rates. curvedot ?
  633. 16:02 beergas: or merely cdot if understood c is curved
  634. 16:05 Shizznet: PaintingStrategy()
  635. then
  636. SetStyle()
  637. 16:06 Shizznet: For dashes/dotted, etc.
  638. 16:09 Nube: Shizz, I don't see SetStyle(Curve.Dotted)
  639. 16:10 Nube: I see it in the style menu on mobile
  640. 16:10 avshar: does anybody know what CUSTOM1 and other CUSTOMxxx fields are for RTD purposes? all I get is "loading" when I pull it
  641. 16:11 Jake-Elwood: have u defined any custom column scripts?
  642. 16:11 avshar: yeah, but they're not called CUSTOMx -- is that where they're taken from?
  643. 16:11 avshar: I'll rename one
  644. 16:12 Jake-Elwood: they started out as CUSTOMx -- you may have renamed them, but that's still what ToS calls em
  645. 16:12 avshar: gotcha, trying it now
  646. 16:15 Shizznet:
  647. plot Data = Average(HL2);
  648. Data.SetPaintingStrategy(PaintingStrategy.LINE);
  649. Data.SetStyle(Curve.SHORT_DASH);
  650. 16:16 Nube: That's short_dash, not dotted
  651. 16:17 Shizznet:
  652. 16:17 Shizznet: Firm = Solid
  653. Points = Dotted
  654. 16:17 Jake-Elwood: I prefer firm curves
  655. 16:17 Shizznet: That's default "look"
  656. 16:18 AlphaInvestor: Nube - all those codes are just constants ... that is, they are just numbers likely starting at one
  657. 16:22 Nube: Mobile has SetStyle(Curve.Dotted)
  658. 16:23 Nube: and SetStyle(Curve.Short_Dash)
  659. 16:23 Nube: and paintingstrategy(Paintingstrategy.Dashes);
  660. 16:24 Shizznet: Firm on desktop is equal to Solid on mobile. Points on desktop is equal to Dotted on mobile. So forth and so on. They're just named differently, if I'm not mistaken.
  661. 16:25 AlphaInvestor: Sounds like an "opportunity" for TOS and TOS Mobile developers to put their heads together
  662. 16:26 Nube:
  663. 16:26 Shizznet: Right
  664. 16:28 AlphaInvestor: I hope bkTOS and Tculs are taking notes
  665. Sounds like an "opportunity" for TOS and TOS Mobile developers to put their heads together and make the line/curve naming more consistent between the two platforms
  666. 16:28 Nube:
  667. 16:29 Nube: Note mobile does not have curve.points
  668. 16:29 Nube: it has dotted instead.
  669. 16:30 Shizznet: It's the same thing
  670. 16:30 Nube: and it is most certainly not the same as points but with another name
  671. 16:30 fasxs: Hi guys, I’m trying to make a label that displays how far through the trading day we are as a %. So say at 1pm we are 50% through the day. Any ideas? Thabks
  672. 16:30 Shizznet: Sidenote= SetLineWeight() does not work on Curve.DOTTED on mobile app.
  673. 16:30 avshar: Jake -- no luck with CUSTOM1 -- I can see it working in the TRADES custom column, but not in excel. I even Exported/CopyPasted it into excel from the trades window -- everything else shows up.
  674. 16:32 UpTheCreek: OMG, next thing you'll be expecting is that scripts work the same way on the platform and mobile
  675. 16:32 Shizznet: I saw him typing and I knew he had somethin like this to say
  676. 16:33 Nube: No, but I DO want to find that dotted on desktop if it's there (and we just don't know about it)
  677. 16:33 UpTheCreek: lol
  678. 16:35 AlphaInvestor: Avshar - this is guaranteed to work if a) you have some indicator programmed for Custom1, and 2) you open TOS before Excel
  679. =RTD("Tos.RTD", , "Custom1", "MU")
  680. 16:36 fasxs: Hi guys, I’m trying to make a label that displays how far through the trading day we are as a %. So say at 1pm we are 50% through the day. Any ideas/would this even work? Thabks
  681. 16:39 AlphaInvestor: Fasxs - honestly to be good at trading you need to become good at doing math quickly in your head. There are 6.5 hours that the market is open, if you cannot do the math to figure out how far we are into the trading day In Your Head ... then you need to find another hobby before all your money is gone
  682. Tough Luv
  683. 16:40 UpTheCreek: the gettime() function is available, so if you really wanted to figure out how to parse and fractionalize it, have at it
  684. 16:40 Shizznet: ^
  685. 16:41 UpTheCreek: countdown to lunchtime is, however, very important
  686. 16:41 AlphaInvestor: I can do that without even doing math in my head, just listen to the grumbles
  687. 16:42 Nube: 2 grumbles is morning snack, 3 is lunchtime
  688. 16:42 Shizznet: def TotalBarsinDay = AggregationPeriod.DAY/GetAggregationPeriod();
  689. 16:45 AlphaInvestor: again, that works because AggregationPeriod.DAY is just a constant, and GetAggregationPeriod() pulls a constant too
  690. 16:47 AlphaInvestor: Later Traders - have a good night
  691. 16:47 UpTheCreek: then you countt bars from open and divide, viola
  692. 16:48 UpTheCreek: GN AI
  693. 16:55 fasxs: What would someone argue to be the best moving averages for intraday charts?
  694. 16:56 Shizznet: 1, 2, 3, 4, 5, 6, 7, 8, 9 and maybe 10.
  695. 16:57 fasxs: lol, seriousley though
  696. 16:57 Nube: The one nobody is looking at
  697. 16:58 Nube: Not 5,000 maybe, but you get the point
  698. 17:00 Nube: I give up, there's no secret setstyle.dotted
  699. 17:01 Shizznet: -_-
  700. 17:17 DMonkey: The secret is in testing and recording the results .....
  701. 17:19 Paris: Noticed in the chat above Mobius Last Year study. I have an earlier version of the same study that takes reference from the close on 12/31. Just reviewing my notes in case anyone was following this study.
  702. 17:27 UpTheCreek: so 12/31 was specifically coded instead of just the year transition?
  703. 17:32 Paris: Here's the snippet if you're interested
  704.  
  705. # Takes reference from the close on 12/31. If you want the open
  706. # for the year then change the close[1] to open
  707.  
  708. def Year_First = if GetYear() != GetYear()[1]
  709. then close[1]
  710. else Year_First[1];
  711. 17:33 fredw: what is setstyle.dotted
  712. 17:35 Nube: It's nothing, turns out.
  713. 17:36 fredw: line vs points?
  714. 17:38 Nube: No. Something that's available on the style menu on mobile but not on desktop. Was sspeculating on what it may be called if it were on desktop.
  715. 17:43 MTS1: Could someone PB today between 14:02 and 15:48 CT please? Not getting enough of the scripting commentary. .
  716. 17:48 admin_tculs: thinkScript Lounge chatroom will be closing soon Please finish all conversations by 8pm ct Have a nice evening
  717. 17:49 harndog: ty
  718. 17:49 Paris: MTS1, here's the timeframes you're looking for /tdYwbKfc
  719. 17:50 MTS1: Thanks Paris!
  720. 17:50 Paris: yw
  721. 17:51 MTS1: What time zone are you in again? For some reason was thinking EU (Paris) but guess may not be??
  722. 17:51 Paris: I'm in GMT+9, that was sent from a friend in another TZ
  723. 17:52 Paris: Have been on assiugnment to another location for the past 3 years now.
  724. 17:53 MTS1: Asia; OK, cool! On assignment from US, or EU, or elsewhere?
  725. 17:53 Paris: EU
  726. 17:54 MTS1: How was the adjustment?
  727. 17:55 Paris: Perfect!
  728. 17:55 MTS1: Cool; wanna go there some point. Have a good night all!
Add Comment
Please, Sign In to add comment