Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

semperfiguy223

Members
  • Content Count

    5
  • Joined

  • Last visited

Posts posted by semperfiguy223


  1. Hi, the "getDayofMonth" string is an error. Do you know how to fix this?

     

    currently there is no way to do this on tos charts,,,, i was however able to make a POC indicator that i have tweaked for 2min on the ES, enjoy!

     

     

    #developing poc by popstocks, for 2min

     

    def swi = if getDayOfMonth() != getDayOfMonth()[1] or secondsfromtime(1614)==0 then 1 else 0;

     

    rec fir = if swi == 1 then close else fir[1];

    rec b1 = if swi == 1 then 0 else if between(close, fir, fir * 1.002) then volume + b1[1] else b1[1];

    rec b2 = if swi == 1 then 0 else if between(close, fir * 0.998, fir) then volume + b2[1] else b2[1];

     

    rec d1 = if swi == 1 then 0 else if between(close, fir * 1.002, fir * 1.004) then volume + d1[1] else d1[1];

    rec d2 = if swi == 1 then 0 else if between(close, fir * 1.004, fir * 1.006) then volume + d2[1] else d2[1];

    rec d3 = if swi == 1 then 0 else if between(close, fir * 1.006, fir * 1.008) then volume + d3[1] else d3[1];

    rec d4 = if swi == 1 then 0 else if between(close, fir * 1.008, fir * 1.010) then volume + d4[1] else d4[1];

    rec d5 = if swi == 1 then 0 else if between(close, fir * 1.010, fir * 1.012) then volume + d5[1] else d5[1];

    rec d6 = if swi == 1 then 0 else if between(close, fir * 1.012, fir * 1.014) then volume + d6[1] else d6[1];

    rec d7 = if swi == 1 then 0 else if between(close, fir * 1.014, fir * 1.016) then volume + d7[1] else d7[1];

    rec d8 = if swi == 1 then 0 else if between(close, fir * 1.016, fir * 1.018) then volume + d8[1] else d8[1];

    rec d9 = if swi == 1 then 0 else if between(close, fir * 1.018, fir * 1.020) then volume + d9[1] else d9[1];

    rec d10 = if swi == 1 then 0 else if between(close, fir * 1.020, fir * 1.022) then volume + d10[1] else d10[1];

    rec d11 = if swi == 1 then 0 else if between(close, fir * 1.022, fir * 1.024) then volume + d11[1] else d11[1];

    rec d12 = if swi == 1 then 0 else if between(close, fir * 1.024, fir * 1.026) then volume + d12[1] else d12[1];

    rec d13 = if swi == 1 then 0 else if between(close, fir * 1.026, fir * 1.028) then volume + d13[1] else d13[1];

    rec d14 = if swi == 1 then 0 else if between(close, fir * 1.028, fir * 1.030) then volume + d14[1] else d14[1];

     

    rec z1 = if swi == 1 then 0 else if between(close, fir * 0.996, fir * 0.998) then volume + z1[1] else z1[1];

    rec z2 = if swi == 1 then 0 else if between(close, fir * 0.994, fir * 0.996) then volume + z2[1] else z2[1];

    rec z3 = if swi == 1 then 0 else if between(close, fir * 0.992, fir * 0.994) then volume + z3[1] else z3[1];

    rec z4 = if swi == 1 then 0 else if between(close, fir * 0.990, fir * 0.992) then volume + z4[1] else z4[1];

    rec z5 = if swi == 1 then 0 else if between(close, fir * 0.988, fir * 0.990) then volume + z5[1] else z5[1];

    rec z6 = if swi == 1 then 0 else if between(close, fir * 0.986, fir * 0.988) then volume + z6[1] else z6[1];

    rec z7 = if swi == 1 then 0 else if between(close, fir * 0.984, fir * 0.986) then volume + z7[1] else z7[1];

    rec z8 = if swi == 1 then 0 else if between(close, fir * 0.982, fir * 0.984) then volume + z8[1] else z8[1];

    rec z9 = if swi == 1 then 0 else if between(close, fir * 0.980, fir * 0.982) then volume + z9[1] else z9[1];

    rec z10 = if swi == 1 then 0 else if between(close, fir * 0.978, fir * 0.980) then volume + z10[1] else z10[1];

    rec z11 = if swi == 1 then 0 else if between(close, fir * 0.976, fir * 0.978) then volume + z11[1] else z11[1];

    rec z12 = if swi == 1 then 0 else if between(close, fir * 0.974, fir * 0.976) then volume + z12[1] else z12[1];

    rec z13 = if swi == 1 then 0 else if between(close, fir * 0.972, fir * 0.974) then volume + z13[1] else z13[1];

    rec z14 = if swi == 1 then 0 else if between(close, fir * 0.970, fir * 0.972) then volume + z14[1] else z14[1];

     

     

     

     

    def o = Max(d1, Max(d2, Max(d3, Max(d4, Max(d5, Max(d6, Max(d7, 0)))))));

     

     

    def n = Max(d8, Max(d9, Max(d10, Max(d11, Max(d12, Max(d13, Max(d14, 0)))))));

    def w = Max(z1, Max(z2, Max(z3, Max(z4, Max(z5, Max(z6, Max(z7, 0)))))));

    def s = Max(z8, Max(z9, Max(z10, Max(z11, Max(z12, Max(z13, Max(z14, 0)))))));

    def g = Max(b1, Max(b2, Max(n, Max(w, Max(s, o)))));

     

    rec po = if g > g[1] then ( ( sum(hlc3*volume,20) / sum(volume,20) ) + average(hlc3,15) )/2 else po[1];

    rec pop = if swi==1 then po[1] else pop[1];

    def poc = if pop == 0 then double.nan else pop;

    plot pz = poc * 1.0015;

    plot py = poc * 0.9985;

     

    def yo = po;

    plot yos = if isnan(close[-1]) then double.NaN else if yo != 0 then yo else double.nan;

    #yos.SetPaintingStrategy(paintingstrategy.points);

    yos.hidebubble();


  2. Hello all.

     

    Here is the TICK

     

    declare lower;

    plot data = high("$tick");

    Plot Data2 = low("$tick");

    plot ZeroLine = 0;

    plot up = 800;

    plot down = -1000;

    Plot Noise = 600;

    Plot Noise2 = -600;

    zeroline.setDefaultColor( color.blue);

    Noise.setDefaultColor(color.yellow);

    noise2.setDefaultColor(color.yellow);

    up.setDefaultColor(color. uptick);

    down.setDefaultColor(color.uptick);

    data.assignValueColor(if data >= 800 then Color.upTICK else Color.blue);

    data.setLineWeight(2);

    Data.setPaintingStrategy( PaintingStrategy.HISTOGRAM);

    data2.assignValueColor(if data2 <= -1000 then Color.downtick else Color.blue);

    data2.setLineWeight(2);

    Data2.setPaintingStrategy (PaintingStrategy.HISTOGRAM);

    ZeroLine.setDefaultColor( GetColor(0));

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.