Announcement

Collapse
No announcement yet.

Code Modification Help?

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

  • Code Modification Help?

    Hi,

    I've been trying to figure out how to modify BidAskRatio.efs to do the following:

    Display a Blue positive histogram bar when Ask-Bid is positive, and current price is above opening price.
    Display a Green positive histogram bar when Ask-Bid is negative, but current price is above opening price.
    Display a Yellow negative histogram bar when Ask-Bid is negative, and current price is below opening price.
    Display a Red negative histogram bar when Ask-Bid is positive, but current price is below opening price.

    Detect Divergence between Price & Histogram Readings.

    Unfortunately, my EFS coding skills suck. I was hoping someone could help me with this?

    Thanks in Advance,

    Ian

    Click image for larger version

Name:	BidAskRatioModification.gif
Views:	1
Size:	28.2 KB
ID:	246935
    Attached Files
    Last edited by ishankey; 12-18-2013, 03:40 PM.

  • #2
    Hi,

    Here is a quick version of what you requested.
    Note that I have found divergence very hard to code correctly and what I did is not by any means perfect. I just added modified code from Chris D. Kryza (Divergence Software, Inc.) http://share.esignal.com/groupconten...es&groupid=114
    He also sells a professionally coded divergence study.

    Display a Blue positive histogram bar when Ask-Bid is positive, and current price is above opening price.
    Display a Green positive histogram bar when Ask-Bid is negative, but current price is above opening price.
    Display a Yellow negative histogram bar when Ask-Bid is negative, and current price is below opening price.
    Display a Red negative histogram bar when Ask-Bid is positive, but current price is below opening price.
    I coded the above conditions as you requested and as shown in the table below except for bars that don't meet any of your criteria in which case they are colored grey:

    up bar & b/a pos = blue
    up bar & b/a neg = green then changed b/a histogram bar from neg to pos
    dn bar & b/a pos = red then changed b/a histogram bar from pos to neg
    dn bar & b/a neg = yellow

    However the graph in the picture you sent contradicts some of the above conditions:
    green & blue bars depict positive bid/ask with both up and down bars
    yellow bars depict negative bid/ask with both up and down bars

    I leave any testing to you.

    BidAskRatio forum question1.efs

    Wayne
    Last edited by waynecd; 12-23-2013, 12:46 AM.

    Comment


    • #3
      Originally posted by waynecd View Post
      Hi,

      Here is a quick version of what you requested.
      Note that I have found divergence very hard to code correctly and what I did is not by any means perfect. I just added modified code from Chris D. Kryza (Divergence Software, Inc.) http://share.esignal.com/groupconten...es&groupid=114
      He also sells a professionally coded divergence study.



      I coded the above conditions as you requested and as shown in the table below except for bars that don't meet any of your criteria in which case they are colored grey:

      up bar & b/a pos = blue
      up bar & b/a neg = green then changed b/a histogram bar from neg to pos
      dn bar & b/a pos = red then changed b/a histogram bar from pos to neg
      dn bar & b/a neg = yellow

      However the graph in the picture you sent contradicts some of the above conditions:
      green & blue bars depict positive bid/ask with both up and down bars
      yellow bars depict negative bid/ask with both up and down bars

      I leave any testing to you.

      [ATTACH]16639[/ATTACH]

      Wayne
      Wow, Thanks for the help, Wayne! I'll test this out & play around with the Code as I am learning EFS scripting. Also, I'll post any modifications/changes I make as my skills improve here for all to see. Once again, thank you VERY much for your help.

      Comment


      • #4
        Yw.

        Wayne

        Comment

        Working...
        X