Tom DeMark's HiLo Formula Mobile Compatibility

R

RICCO

New member
Hello all, hope this message finds you all well and safe during this pandemic. Now down to business.

I know a thing or two about programming but trying to make the below script be mobile compatible seems to be way over my head. I'm trying to write a script to plot a Pivot Point and tomorrow's high and low using Tom DeMark's formula; nothing fancy. How can I convert the below to be mobile compatible? I've seen other posts talking about what the mobile app allows and what doesn't but nothing I do seems to work. I even tried to incorporate and adjust the below with the Globlex_HiLo script and I screwed that up big time.

I will be using the script in conjuction with the Globlex_HiLo script that displays the entire Globex session.

Could you guys please give some a hand on this?

Code:
#[Start of Code]
input timeFrame = {default DAY, "2 DAYS", "3 DAYS", "4 DAYS", WEEK, MONTH, "OPT EXP", QUARTER, YEAR};
#input aggregationPeriod = AggregationPeriod.DAY;

def yesterdayOpen = open(period = timeFrame)[1];
def yesterdayHigh = high(period = timeFrame)[1];
def yesterdayLow = low(period = timeFrame)[1];
def yesterdayClose = close(period = timeFrame)[1];

def todayOpen = open(period = timeFrame);
def todayHigh = high(period = timeFrame);
def todayLow = low(period = timeFrame);
def todayClose = close(period = timeFrame);

def PP = (todayOpen + yesterdayHigh + yesterdayLow + yesterdayClose) / 4;

def Temp = if todayClose < todayOpen then (todayHigh + (2 * todayLow) + todayClose)
    else if todayClose > todayOpen then ((2 * todayHigh) + todayLow + todayClose)
    else (todayHigh + todayLow + (2 * todayClose));

plot P;
P = PP;
P.SetDefaultColor(Color.BLUE);
P.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

plot predictedHigh;
predictedHigh = ((Temp / 2) - todayLow);
predictedHigh.SetDefaultColor(Color.RED);
predictedHigh.SetLineWeight(5);
predictedHigh.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

plot predictedLow;
predictedLow = ((Temp / 2) - todayHigh);
predictedLow.SetDefaultColor(Color.GREEN);
predictedLow.SetLineWeight(5);
predictedLow.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
#[End of Code]
 

Similar threads

Top