Announcement

Collapse
No announcement yet.

Clayburg DDF

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Clayburg DDF

    Hi all,

    Just wondering if there is any Dr Clayburg's DDF studies for eSignal around. I did a search here but couldn't find anything. Any kind soul willing to code it? Thanks!


    Joryan

  • #2
    Prototype DDF & getValueAbsolute questions

    I have whipped up a 2 different version of the Clayburg DDF yesterday.

    The first is based on the firstxminsh(2).efs, as that seemed to be a quick win:

    issues:

    The chart interval needs to be evenly divisable into 5 and 60, due to over writting open on each bar only 5 minute chart will work.

    normal chart time templates need to be used also.




    The second efs is an attempt to convert to getValueAbsolute.
    I tired two different solutions here, the first being a time differential to try and determine an offset and the second being based on the 30msh.efs.

    The problems with the second type of script using the getValueAbsolute seems to be significantly out of range data at times, which cause the high and low to be wrong ...

    There also appears to be a problem with my offset for the 5 minute check such that it is incorrect at times.

    Here is the logic protion of the getVAlueAbolute attempt
    remove poor offset attemps, went to first bar, still incorrect
    for high and low hourly:
    ==================================
    Hsymbol = getSymbol().toUpperCase() + ",60";
    Fsymbol = getSymbol().toUpperCase() + ",5";

    var vTime = getValue("Time");
    FirstBar = getFirstBarIndexOfDay(vTime);

    if ( FirstBar != null ) {
    vHigh = getValueAbsolute( "high", FirstBar, Hsymbol );
    vLow = getValueAbsolute( "low" , FirstBar, Hsymbol );
    }

    // Get 5 minute average
    FIndex = getFirstBarIndexOfDay( vTime, Fsymbol);

    if ( FIndex != null ) {
    FmHigh = getValueAbsolute( "high" , FIndex, Fsymbol );
    FmLow = getValueAbsolute( "low" , FIndex, Fsymbol );
    FmOpen = getValueAbsolute( "open" , FIndex, Fsymbol );
    FmClose = getValueAbsolute( "close", FIndex, Fsymbol );

    //might as wel do this while active ...
    FmAve = ( FmHigh + FmOpen + FmClose + FmLow ) / 4 ;

    }

    =================================

    Quick question for esignal or efs coders:

    Any way to solve issues with getValueAbsolute providing incorrect data? I realize that till the last tick of the hourly bar is done that the data will be incomplete but this seems more insideous.

    anyway to detmine a simple time offset? for example fetch the 6:30 bar of 5 min data in an unknown time templete seems to be really painful.

    There also appears to be issue with using a smaller time interval in the symbol for getValueAbsolute. Is that known? any work around.


    I realize that there are probably numerous bad thing (tm) coding issues inmy attempts but all in all not bad first trys...

    -Terry
    Last edited by thaynes; 02-17-2004, 07:59 AM.

    Comment


    • #3
      dfs 1 baised on firstxminsh(2).efs

      Hmmm seem to have problems with attachments ...
      if someone wants to suggest upload location I can put them there.
      Attached Files

      Comment


      • #4
        Terry
        You can create your own group in FileShare and post them there
        Alex

        Comment


        • #5
          thanks ...

          updated my post with a snippet of code,

          managed a attach the semi working DDF.


          btw this is what I was using to try and detemine the offset
          to get the 5 minute bar at 6:30


          cofHour = Math.round(( getHour() - 6 ) * 12) ;
          if ( cofHour < 0 ) {
          // before 6am on chart need try for yesterdays data ...
          // not sure this will work or be accurate for non standard template
          cofHour += 288;
          }

          //minute offset = 6 - minute / 5
          cofMin = Math.round(( getMinute() - 30) / 5) ;

          //Compute Offset
          FIndex = cofHour + cofMin;

          if ( FIndex != null ) {
          FmHigh = getValueAbsolute( "high", FIndex, Fsymbol );
          FmLow = getValueAbsolute( "low", FIndex, Fsymbol );
          FmOpen = getValueAbsolute( "open", FIndex, Fsymbol );
          FmClose = getValueAbsolute( "close", FIndex, Fsymbol );

          //might as wel do this while active ...
          FmAve = ( FmHigh + FmOpen + FmClose + FmLow ) / 4 ;


          is there any easie way to determine an offset?

          Comment

          Working...
          X