Announcement

Collapse
No announcement yet.

Playback question

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

  • Playback question

    Howdy,
    When i'm playing back a downloaded tic file .... if there any way to determine what the symbol is for that file during playback ? Basically i've written a general script for 6 currency pairs and i would like to set a cpl of parameters based on the pair being played back ... is there a method for my script to determine which currency is being played back ?

    thx ...

  • #2
    you could try putting this in the code to see what the internal "getSymbol()" function returns.

    debugPrintln("Playback symbol :"+getSymbol());

    If that provides anything of use, then you could parse/set your variables as needed at the first bar of the playback.

    PHP Code:
    //  global variables
    var vInitCodeSetting true;
    var 
    SampleControlVariable 0;


    //  Premain function
    function preMain() {

    }

    // main function
    function main() {

       if (
    vInitCodeSetting) {
         
    fSetupCodeVariables();
         
    vInitCodeSetting false;
       }

    }

    function 
    fSetupCodeVariables() {
      if (
    getSymbol() == "ABCD") {
          
    SampleControlVariable 1;
        ..  
    Set variables here
      
    }
      if (
    getSymbol() == "IBM") {
          
    SampleControlVariable 2;
        ..  
    Set variables here
      
    }
      if (
    getSymbol() == "XYZ") {
          
    SampleControlVariable 3;
        ..  
    Set variables here
      
    }




    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      Thanks for getting back to me so quickly...

      but your solution will always return "$PLAYBACK" as the symbol for any currency being played back. I was thinking there might be a way to read the name of the tic file or something like that but have not been able to find a solution as yet.

      Chris

      Comment


      • #4
        to be honest, I don't use the tick playback feature much. I was just offering some suggestions.
        Brad Matheny
        eSignal Solution Provider since 2000

        Comment

        Working...
        X