• Get $30 off VIP with code SUMMER30. Ends July 27. Happy trading!

Looking for help converting for TOS Mobile

Mallozzi83

New member
Hello,

Here is a custom script I found from some great people on twitter. It works fine on TOS desktop but wont work on mobile when I add it to my scripts. I was told someone here may be able to tweak it! I have no experience coding.

def outBar = low[1] < low[2] and high[1] > high[2];
def inBar = low > low[1] and high < high[1];

def holyGrail = inBar and outBar;

def HG = if holyGrail then Double.POSITIVE_INFINITY else Double.NEGATIVE_INFINITY;

AddCloud(HG,-HG,color.YELLOW,color.current);

Thanks
Gary
 

mjamesb80

New member
Try this. It should provide a "point" indicator on mobile where the cloud would be drawn.
Change the point to an arrow or look through other options in the study's gear settings on mobile.

Code:
def outBar = low[1] < low[2] and high[1] > high[2];
def inBar = low > low[1] and high < high[1];

def holyGrail = inBar and outBar;

def HG = if holyGrail then Double.POSITIVE_INFINITY else Double.NEGATIVE_INFINITY;

AddCloud(HG,-HG,color.YELLOW,color.current);

plot pt = if holyGrail then low else Double.NaN;
pt.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);
pt.SetLineWeight(1);
pt.AssignValueColor(COLOR.CYAN);
 
Top