Announcement

Collapse
No announcement yet.

How to use "reloadEFS()" function?

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

  • How to use "reloadEFS()" function?

    Hi,

    can anybody explain to me how to use the 'reloadEFS()' function?
    If I use this function in the following way, then my application crashes and I have to restart it.

    ...
    if (nBarState == BARSTATE_NEWBAR) {
    relaodEFS();
    }
    ...

    I'm using build 595.
    Can anybody give me an EFS example?
    Thank you.

    Guido

  • #2
    Guido,

    I think you must have just made a type-o when making your post (didn't cut & paste), but just to be sure...your reloadEFS() isn't spelled right in the formula.

    Now if you were to create a formula like that you would create an infinate loop, and that would blow up eSignal eventually I would guess.

    Everytime you do a NEWBAR you would reload the efs...which means you would never get further than the first bar before restarting and doing the first bar again.

    I still highly recommend not using reloadEFS(), there is often better ways of accomplishing the same thing. It is just too easy to create on infinite loop, and also their is extra drain on the CPU than there would be with more ellagent solutions.

    So, you are using it correctly syntax wise just not logic wise.

    Garth
    Garth

    Comment


    • #3
      Garth,

      OK, I have misunderstood this function.

      The reason for my question ist the following problem:
      I'm using UP- and DOWN arrows in my candlestick charts. The arrows are drawn if certain conditions are correct. Unfortunately the arrows fairly often aren't correct any more at the end of a candle although they were correct in the beginning of a candle.
      I wouldn't like a reload of this EFS script for every tick but only at the end of a candle.
      How can I solve this problem?

      Guido

      Comment


      • #4
        I would take a different approach. If I understand this correctly, it is only the most recent candle that you would need to change the arrow on, correct?

        If so, by using the unique label you provide as the last imput to the DrawXXX() routine, you should be able to remove the image.


        PHP Code:
        drawShapeRelative(10,20,UPARROW, ,Color.greenShape.ONTOPMyLabel);
        .
        .
        if (
        getBarState == BARSTATE_NEWBAR){
           if (
        close() < nMyGuess){
              
        removeShape(MyLabel);
           }

        Garth

        Comment

        Working...
        X