Current high of day on mobile


Category:
0
0

Hi Pete, can you please take a look at the code below that is made to track the current days high. It works fine on a computer but when I transfer it to mobile instead of tracking the current high of day, it moves to the bars high of day. Thanks.

 

 

def MktPlot = GetLastDay() – 8 <= GetDay() and GetLastYear() – 0 <= GetYear();

def RMplots = RegularTradingStart (GetYYYYMMDD()) > GetTime() – 28880000;

def day = GetDay();

def Open = day != day[1];

def CDHigh = if !day then Double.NaN else high (period = “day”);

plot CDH = if MktPlot and RMplots then CDHigh else Double.NaN;

CDH.SetDefaultColor (Color.GREEN);

CDH.SetStyle (Curve.SHORT_DASH);

 

Marked as spam
Posted by (Questions: 2, Answers: 3)
Asked on December 13, 2019 5:19 pm
43 views
0
*The bars high, not high of day. So essentially on mobile, it justs draws a line from each bars high to the next high.
( at December 13, 2019 5:29 pm)
0
Private answer

Secondary aggregation periods are not currently supported on the mobile platform. I have not found a way to work around this limitation.

Edit: After reviewing the comment to my original answer I decided to test one of the indicators published on the Hahn-Tech website. I found the chart study included with the following video does indeed work on the mobile app. Previously this chart study was not supported on the mobile app. TDA developers must have added support for this sort of solution in a recent upgrade.

Thinkorswim Alert High Low Version 2 https://www.hahn-tech.com/thinkorswim-alert-high-low-version-two/

Marked as spam
Posted by (Questions: 37, Answers: 4086)
Answered on December 13, 2019 8:47 pm
0
They were talking about a workaround for something similar at https://usethinkscript.com/threads/fix-secondary-period-not-allowed-in-thinkorswim-scanner.927/ I tried to use this and I got close, but I never figured out how to properly use it. Could you take a look and see if it applies to my situation? Thanks.
( at December 13, 2019 10:21 pm)
0
I updated my answer to include a solution. I did not find any useable solution in the link you provided. But I only viewed the first page in that thread. I decided it would be quicker for me to simply test one of the indicators I have already published.
( at December 14, 2019 8:15 am)
0
Ok thanks! Is it possible to change your script so it plots previous day highs and lows instead of current day highs and lows?
( at December 14, 2019 8:19 pm)
0
Not really, no. The code was only intended to track current day's high and low.
( at December 14, 2019 8:42 pm)