Beta 2.14 - problem with fce tick()

Posted By: Grat

Beta 2.14 - problem with fce tick() - 06/15/19 07:24

Hi,

in the beta, version 2.14 is a bug with fce tick() and algo. In this construction:
Code
function run(){
...
  
while(algo(loop("OPEN","CLOSE"))){
...
...
// run code for algos
}
} // end of FCE run()

function tick(){
    
        if(Algo == "CLOSE") {
      	  printf("\n************RUN CLOSE*************");
        }
          
        if(Algo == "OPEN") {
        
          printf("\n************RUN OPEN*************");
        }	
}



Quote
User-supplied function that is called on arrival of a new price quote of any asset used in the strategy. This function can be used when an immediate reaction on every new price quote is required.


In the FCE tick() call only Algo "CLOSE", for algo "OPEN" i must make this workaround:
Code
        algo("OPEN");
        if(Algo == "OPEN") {......
Posted By: Spirit

Re: Beta 2.14 - problem with fce tick() - 06/15/19 07:39

You must always call algo() for setting the Algo string, what has it to do with the beta version?
Posted By: Grat

Re: Beta 2.14 - problem with fce tick() - 06/15/19 08:05

Aaaa, this is a my mistake, I thinking the FCE tick() is calling from construct:

while(algo(loop("OPEN","CLOSE"))){ ... }


thanks
© 2024 lite-C Forums