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.

Garylim

Members
  • Content Count

    24
  • Joined

  • Last visited

Posts posted by Garylim


  1. Here is the full curves for CQG. Could any1 please take a look to see if anything is missing?

     

    I noted that the std deviation are all constant from each other so there is something wrong but i do not know what.

     

    HELP !!!

     

     

    Deviation 3 Curve:

     

    day:= BarsSince(BarIx(@,StartOf Day) = 0,1,10000)+1;

    day2:= BarsSince(BarIx(@,StartOf Session) = 0,1,10000)+1;

    priceX:= IF(price = 1, Close(@), IF(price = 2, High(@), IF(price = 3, Low(@), IF(price = 4, Mid(@), IF(price = 5, HLC3(@), IF(price = 6, Avg(@), IF(price=7, Open(@), 0) ) ) ) ) ) ) ;

     

    vol:= IF( HasVal(Vol(@)) AND Vol(@) > 0, Vol(@), 1) ;

     

    a:= Sum(priceX* vol,day)/ Sum(vol,day);

    b:= Sum(priceX* vol,day2)/ Sum(vol,day2);

    c1:= Sum(priceX* vol,Period)/ Sum(vol,Period);

     

    VWAP:= IF(DaySessionPeriod = 1, a, IF(DaySessionPeriod = 2, b, IF(DaySessionPeriod = 0, c1, a) ) );

     

     

     

    DAYSES:= STDDEV(@,day)/100;

    SES:= STDDEV(@,day2)/100;

    ANY:= STDDEV(@,Period);

    STD:=IF(DaySessionPeriod = 1, DAYSES, IF(DaySessionPeriod = 2, SES, IF(DaySessionPeriod = 0, ANY, ANY) ) );

     

    R:=VWAP+((STD*DEV3));

     

    Deviation 2 Curve:

     

    day:= BarsSince(BarIx(@,StartOf Day) = 0,1,10000)+1;

    day2:= BarsSince(BarIx(@,StartOf Session) = 0,1,10000)+1;

    priceX:= IF(price = 1, Close(@), IF(price = 2, High(@), IF(price = 3, Low(@), IF(price = 4, Mid(@), IF(price = 5, HLC3(@), IF(price = 6, Avg(@), IF(price=7, Open(@), 0) ) ) ) ) ) ) ;

     

    vol:= IF( HasVal(Vol(@)) AND Vol(@) > 0, Vol(@), 1) ;

     

    a:= Sum(priceX* vol,day)/ Sum(vol,day);

    b:= Sum(priceX* vol,day2)/ Sum(vol,day2);

    c1:= Sum(priceX* vol,Period)/ Sum(vol,Period);

     

    VWAP:= IF(DaySessionPeriod = 1, a, IF(DaySessionPeriod = 2, b, IF(DaySessionPeriod = 0, c1, a) ) );

     

    DAYSES:= STDDEV(@,day)/100;

    SES:= STDDEV(@,day2)/100;

    ANY:= STDDEV(@,Period);

    STD:=IF(DaySessionPeriod = 1, DAYSES, IF(DaySessionPeriod = 2, SES, IF(DaySessionPeriod = 0, ANY, ANY) ) );

     

    VWAP+((STD*DEV2));

     

    Deviation 1 Curve:

     

    day:= BarsSince(BarIx(@,StartOf Day) = 0,1,10000)+1;

    day2:= BarsSince(BarIx(@,StartOf Session) = 0,1,10000)+1;

    priceX:= IF(price = 1, Close(@), IF(price = 2, High(@), IF(price = 3, Low(@), IF(price = 4, Mid(@), IF(price = 5, HLC3(@), IF(price = 6, Avg(@), IF(price=7, Open(@), 0) ) ) ) ) ) ) ;

     

    vol:= IF( HasVal(Vol(@)) AND Vol(@) > 0, Vol(@), 1) ;

     

    a:= Sum(priceX* vol,day)/ Sum(vol,day);

    b:= Sum(priceX* vol,day2)/ Sum(vol,day2);

    c1:= Sum(priceX* vol,Period)/ Sum(vol,Period);

     

    VWAP:= IF(DaySessionPeriod = 1, a, IF(DaySessionPeriod = 2, b, IF(DaySessionPeriod = 0, c1, a) ) );

     

    DAYSES:= STDDEV(@,day)/100;

    SES:= STDDEV(@,day2)/100;

    ANY:= STDDEV(@,Period);

    STD:=IF(DaySessionPeriod = 1, DAYSES, IF(DaySessionPeriod = 2, SES, IF(DaySessionPeriod = 0, ANY, ANY) ) );

     

    VWAP+((STD*DEV1));

     

    Vwap:

     

    day:= BarsSince(BarIx(@,StartOf Day) = 0,1,10000)+1;

    day2:= BarsSince(BarIx(@,StartOf Session) = 0,1,10000)+1;

    priceX:= IF(price = 1, Close(@), IF(price = 2, High(@), IF(price = 3, Low(@), IF(price = 4, Mid(@), IF(price = 5, HLC3(@), IF(price = 6, Avg(@), IF(price=7, Open(@), 0) ) ) ) ) ) ) ;

     

    vol:= IF( HasVal(Vol(@)) AND Vol(@) > 0, Vol(@), 1) ;

     

    a:= Sum(priceX* vol,day)/ Sum(vol,day);

    b:= Sum(priceX* vol,day2)/ Sum(vol,day2);

    c1:= Sum(priceX* vol,Period)/ Sum(vol,Period);

     

    VWAP:= IF(DaySessionPeriod = 1, a, IF(DaySessionPeriod = 2, b, IF(DaySessionPeriod = 0, c1, a) ) );

     

    DAYSES:= STDDEV(@,day)/100;

    SES:= STDDEV(@,day2)/100;

    ANY:= STDDEV(@,Period);

    STD:=IF(DaySessionPeriod = 1, DAYSES, IF(DaySessionPeriod = 2, SES, IF(DaySessionPeriod = 0, ANY, ANY) ) );

     

    VWAP

     

    - Deviation 1:

     

    day:= BarsSince(BarIx(@,StartOf Day) = 0,1,10000)+1;

    day2:= BarsSince(BarIx(@,StartOf Session) = 0,1,10000)+1;

    priceX:= IF(price = 1, Close(@), IF(price = 2, High(@), IF(price = 3, Low(@), IF(price = 4, Mid(@), IF(price = 5, HLC3(@), IF(price = 6, Avg(@), IF(price=7, Open(@), 0) ) ) ) ) ) ) ;

     

    vol:= IF( HasVal(Vol(@)) AND Vol(@) > 0, Vol(@), 1) ;

     

    a:= Sum(priceX* vol,day)/ Sum(vol,day);

    b:= Sum(priceX* vol,day2)/ Sum(vol,day2);

    c1:= Sum(priceX* vol,Period)/ Sum(vol,Period);

     

    VWAP:= IF(DaySessionPeriod = 1, a, IF(DaySessionPeriod = 2, b, IF(DaySessionPeriod = 0, c1, a) ) );

     

    DAYSES:= STDDEV(@,day)/100;

    SES:= STDDEV(@,day2)/100;

    ANY:= STDDEV(@,Period);

    STD:=IF(DaySessionPeriod = 1, DAYSES, IF(DaySessionPeriod = 2, SES, IF(DaySessionPeriod = 0, ANY, ANY) ) );

     

    VWAP - ((STD*DEV1));

     

    -Deviation 2:

     

    day:= BarsSince(BarIx(@,StartOf Day) = 0,1,10000)+1;

    day2:= BarsSince(BarIx(@,StartOf Session) = 0,1,10000)+1;

    priceX:= IF(price = 1, Close(@), IF(price = 2, High(@), IF(price = 3, Low(@), IF(price = 4, Mid(@), IF(price = 5, HLC3(@), IF(price = 6, Avg(@), IF(price=7, Open(@), 0) ) ) ) ) ) ) ;

     

    vol:= IF( HasVal(Vol(@)) AND Vol(@) > 0, Vol(@), 1) ;

     

    a:= Sum(priceX* vol,day)/ Sum(vol,day);

    b:= Sum(priceX* vol,day2)/ Sum(vol,day2);

    c1:= Sum(priceX* vol,Period)/ Sum(vol,Period);

     

    VWAP:= IF(DaySessionPeriod = 1, a, IF(DaySessionPeriod = 2, b, IF(DaySessionPeriod = 0, c1, a) ) );

     

    DAYSES:= STDDEV(@,day)/100;

    SES:= STDDEV(@,day2)/100;

    ANY:= STDDEV(@,Period);

    STD:=IF(DaySessionPeriod = 1, DAYSES, IF(DaySessionPeriod = 2, SES, IF(DaySessionPeriod = 0, ANY, ANY) ) );

     

    VWAP - ((STD*DEV2));

     

    -Deviation 3:

     

    day:= BarsSince(BarIx(@,StartOf Day) = 0,1,10000)+1;

    day2:= BarsSince(BarIx(@,StartOf Session) = 0,1,10000)+1;

    priceX:= IF(price = 1, Close(@), IF(price = 2, High(@), IF(price = 3, Low(@), IF(price = 4, Mid(@), IF(price = 5, HLC3(@), IF(price = 6, Avg(@), IF(price=7, Open(@), 0) ) ) ) ) ) ) ;

     

    vol:= IF( HasVal(Vol(@)) AND Vol(@) > 0, Vol(@), 1) ;

     

    a:= Sum(priceX* vol,day)/ Sum(vol,day);

    b:= Sum(priceX* vol,day2)/ Sum(vol,day2);

    c1:= Sum(priceX* vol,Period)/ Sum(vol,Period);

     

    VWAP:= IF(DaySessionPeriod = 1, a, IF(DaySessionPeriod = 2, b, IF(DaySessionPeriod = 0, c1, a) ) );

     

    DAYSES:= STDDEV(@,day)/100;

    SES:= STDDEV(@,day2)/100;

    ANY:= STDDEV(@,Period);

    STD:=IF(DaySessionPeriod = 1, DAYSES, IF(DaySessionPeriod = 2, SES, IF(DaySessionPeriod = 0, ANY, ANY) ) );

     

    VWAP - ((STD*DEV3));


  2. Can someone, or Dbtina, pls pls help me check if anything needs to be modified? I had the code below sent and i am using cqg

     

     

     

    day:= BarsSince(BarIx(@,StartOf Day) = 0,1,10000)+1;

    day2:= BarsSince(BarIx(@,StartOf Session) = 0,1,10000)+1;

    priceX:= IF(price = 1, Close(@), IF(price = 2, High(@), IF(price = 3, Low(@), IF(price = 4, Mid(@), IF(price = 5, HLC3(@), IF(price = 6, Avg(@), IF(price=7, Open(@), 0) ) ) ) ) ) ) ;

    vol:= IF( HasVal(Vol(@)) AND Vol(@) > 0, Vol(@), 1) ;

    a:= Sum(priceX* vol,day)/ Sum(vol,day);

    b:= Sum(priceX* vol,day2)/ Sum(vol,day2);

    c1:= Sum(priceX* vol,Period)/ Sum(vol,Period);

    VWAP:= IF(DaySessionPeriod = 1, a, IF(DaySessionPeriod = 2, b, IF(DaySessionPeriod = 0, c1, a) ) );

     

    DAYSES:= STDDEV(@,day)/100;

    SES:= STDDEV(@,day2)/100;

    ANY:= STDDEV(@,Period);

    STD:=IF(DaySessionPeriod = 1, DAYSES, IF(DaySessionPeriod = 2, SES, IF(DaySessionPeriod = 0, ANY, ANY) ) );

    R:=VWAP+((STD*DEV3));


  3. Managed to upload a file, seems slightly different le.... I am in Asia timing so i am nt sure if its accurate, anyway posted e coding i made,

     

    Could u roughly check plszzzzzzz ??

     

    day:= BarsSince(BarIx(@,StartOfDay) = 0,1,10000)+1;

    day2:= BarsSince(BarIx(@,StartOfSession) = 0,1,10000)+1;

    priceX:= IF(price = 1, Close(@), IF(price = 2, High(@), IF(price = 3, Low(@), IF(price = 4, Mid(@), IF(price = 5, HLC3(@), IF(price = 6, Avg(@), IF(price=7, Open(@), 0) ) ) ) ) ) ) ;

    vol:= IF( HasVal(Vol(@)) AND Vol(@) > 0, Vol(@), 1) ;

    a:= Sum(priceX* vol,day)/ Sum(vol,day);

    b:= Sum(priceX* vol,day2)/ Sum(vol,day2);

    c1:= Sum(priceX* vol,Period)/ Sum(vol,Period);

    VWAP:= IF(DaySessionPeriod = 1, a, IF(DaySessionPeriod = 2, b, IF(DaySessionPeriod = 0, c1, a) ) );

     

    DAYSES:= STDDEV(@,day)/100;

    SES:= STDDEV(@,day2)/100;

    ANY:= STDDEV(@,Period);

    STD:=IF(DaySessionPeriod = 1, DAYSES, IF(DaySessionPeriod = 2, SES, IF(DaySessionPeriod = 0, ANY, ANY) ) );

    R:=VWAP+((STD*DEV3));

    untitled.thumb.JPG.32609a3b58f73f1048ae6b10ab0341ca.JPG


  4. Managed to do something abt the bands in cqg, however may i ask if the bands recalculation period i set to 28 periods for 2 min periods, would it be more accurate?

     

    i noted that if i set it to recalculate per 2 min, my chart becomes very jerky and messy, and setting it to a longer period per recalculation makes it smoother.

     

     

    Is it wrong?

     

    BTW, i got a very impt question, 2 STD DEV is 2 X 1STD DEV right? just wanan clarify.

    cos this means if i managed to calcualte 1 std dev, 2 or 3 std dev shld nt be a prob


  5. Managed to do something abt the bands in cqg, however may i ask if the bands recalculation period i set to 28 periods for 2 min periods, would it be more accurate? i noted that if i set it to recalculate per 2 min, my chart becomes very jerky and messy, and setting it to a longer period per recalculation makes it smoother.

     

     

    Is it wrong?

     

     

    BTW, i got a very impt question, 2 STD DEV is 2 X 1STD DEV right? just wanan clarify.

    cos this means if i managed to calcualte 1 std dev, 2 or 3 std dev shld nt be a prob

×
×
  • Create New...

Important Information

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