in Search

Draw Gap only on Gap Days

Last post 08-22-2007, 4:00 by Ray.. 2 replies.
Sort Posts: Previous Next
  •  08-20-2007, 20:03 25078

    Draw Gap only on Gap Days

    I am newbie towards msl coding and I had spent hours simply trying to draw simple parallel lines representing daily gap on daily chart. Your valuable input will be appreciated.

    My code is OK to draw gap, however not capable to get rid of non-gap days. In simple word, draw gap range parallel lines for only gap days.
  •  08-21-2007, 8:18 25083 in reply to 25078

    Re: Draw Gap only on Gap Days

    Hi Ray.

    Welcome to the Forum.

    One of the issues you are going to be confronted with often is the fact that MetaStock doesn't deal with NULL values very well.  Once you have started returning values for a function, a value must be returned on every bar after.  In your case, you don't have to have any lines drawn until the first instance of the gap code, but for every bar after there will be values returned and lines drawn.  All you can do is assign a value that will not cause too many clarity issues for reading the chart or rescaling issues.



    Hope this helps.

    wabbit Big Smile [:D]


    MS: 6.52 EOD, 7.x EOD, 8.0 PRO, 9.2 PRO w/QC, 10 PRO w/QC & MDK
    For custom MetaStock programming : http://www.wabbit.com.au
    My SkyPE status : wabbit.com.au SkyPE online status
    My SkyPE account : wabbit.com.au

  •  08-22-2007, 4:00 25088 in reply to 25083

    Re: Draw Gap only on Gap Days

    Got! Thanks Wabbit!

    btw, i enjoy lots of  your great posts such as "RMO Shape & Size Doesn't Matter? Why Not?". I'd come back to you with new puzzles later.
View as RSS news feed in XML