Announcement

Collapse
No announcement yet.

Trouble with setColorPriceBars()

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

  • Trouble with setColorPriceBars()

    Hi,

    I try to activate price bar colors with setColorPriceBars() function when I click on a button I have, but does not work as expected.

    If the default value of the button is colors OFF, never works.
    If the default value of the button is color ON, it works only after I remove the study and put back, but price bars go white/lightgrey when I turn colors off.

    Note: I do reload the efs after click action.

    Can anybody explain how can it be done? It is not first time I had similar trouble and does not seem to be an un-known problem, but it seems that the resolution continues to be put off.

    Thank you.
    Mihai Buta

    Thank you.

    P.S. I reread an old thread on the same subject. The conclusion was that
    a/ ONLY IF the study is initially loaded with the coloring ON it is possible to color the price bars and
    b/ Once so loaded cannot be turned off anymore.

    It seems that not much changed since then.
    Pretty stiff limitation and too bad that nobody "hears" us.
    Last edited by mbuta; 02-07-2004, 06:45 PM.
    Mihai Buta

  • #2
    I have been successful at changing button colors by clicking on a button. I have not tried to change bar colors in this fashion. If I were to do this, I would reload the efs, which is what you appear to be doing.

    One thing to consider is that preMain is not processed when you use the reloadEFS() function.

    Whenever I rely upon reloadEFS, I put actions in a getBarState() == BARSTATE_ALLBARS if statement.

    PHP Code:
    function main() {
     


        if (
    getBarState() == BARSTATE_ALLBARS) {//true once during initial load and subsequent reload using reloadEFS()
        
        
        

    I do not know if putting setColorPriceBars() function in here.

    I have experienced problems where I have induced an error in my code and steps in my code are not implemented as expected.

    I am not saying that is the problem in your case at all. What I do when I am in a situation such as this is I write information to a file which indicates what is going on. Here is an example of some steps out of some code I have been troubleshooting tonight:
    PHP Code:
        trace("xProfit:"+xProfit );trace("bestComp:"+bestComp );trace("xTrades:"+xTrades );trace("save");
    if ( 
    xProfit >= bestComp && xTrades ) {trace("1166");trace("save"); 
    The trace function is a function that I put together, which you are welcome to if you wish.

    I pull up the created file after I take an action and see if I can figure out what is happening.



    FWIW

    Comment


    • #3
      Steve,

      Thank you for your reply.

      This setColorBarPrice function is an example of poor documentation for over a year now. It is a known problem, nobody bothered to document it and (this gets me the most) nobody from the eSignal staff of paid support people bother to jump in to clarify the issue. They let us bang our heads and "guess" what is the problem and how to solve.

      If they have the money to spend on so much TV advertising, one think they should have the money to pay someone a few hours a week to clarify/document so many ridiculously simple bugs they have in their software.

      Yet, they refuse to do it. Moreover, they are proud of their system and support (directly from their support manager). The truth is, they are too busy trading their own accounts(as also admitted by their manager) and they give priority to issues that help their trading systems woek better.


      I don't judge their design (!!!) but this function, like setBarPrice color as well, by design, works ONLY IF ACTIVE WHEN THE STUDY IS INITIALLY LOADED.
      Re-leading efs does not activate it anymore and once loaded CANNOT be inactivated by re-load either.

      I found way to circumvent the problem, but
      Mihai Buta

      Comment


      • #4
        Try this...

        Try leaving "setColorPriceBars" in place (ON) for the EFS, then use "setDefaultPriceBarColor" and "setPriceBarColor" (as needed) to change the color of a bar when the button is ON/OFF.

        In this manner, you will not need to RELOAD anything. You will use the DEFAULT colors when OFF and then SET the COLORS when ON.

        This makes sense to me (that is should work) and may solve your problems.

        B
        Brad Matheny
        eSignal Solution Provider since 2000

        Comment


        • #5
          I like that

          Comment


          • #6
            Hi Brad and thank you.

            I did something similar: if button is OFF I color the bars myself with default colors. This way I can re-color the entire chart on re-load.

            I still believe we deserve better support and that such issues should be clarified and documented for everybody for everybody as they arise.

            Thankx again,
            Mihai
            Mihai Buta

            Comment

            Working...
            X