Trigun1127
Member
I've been using this forever just a line that marks your average price on the chart. Suddenly and only on /MES it stopped working and i cant get it to work. I can go on any other chart and it works fine. Any ideas?
# Entry Price Line
# Original Code by Mobius
def c = close;
def n = double.nan;
def pl = GetOpenPL();
def ap = GetAveragePrice();
def bn = barnumber();
def ee = if isnan(ap) then ee[1] else ap;
def lb = if ee != ee[1] then bn else lb[1];
def PercentChg = if ee then (c-ee)/ee else 0;
plot entry = if bn >= HighestAll(lb) and ee > 0 then
HighestAll(if IsNaN(c[-1]) then ee else n) else n;
entry.SetDefaultColor(color.cyan);
# end
# Entry Price Line
# Original Code by Mobius
def c = close;
def n = double.nan;
def pl = GetOpenPL();
def ap = GetAveragePrice();
def bn = barnumber();
def ee = if isnan(ap) then ee[1] else ap;
def lb = if ee != ee[1] then bn else lb[1];
def PercentChg = if ee then (c-ee)/ee else 0;
plot entry = if bn >= HighestAll(lb) and ee > 0 then
HighestAll(if IsNaN(c[-1]) then ee else n) else n;
entry.SetDefaultColor(color.cyan);
# end