in Search

Indicator (and my code) called multiple times till value changes

Last post 04-25-2009, 19:40 by wabbit. 1 replies.
Sort Posts: Previous Next
  •  04-25-2009, 15:25 29551

    Indicator (and my code) called multiple times till value changes

    Hi,
      I am new to MDK and this may be a basic query.  I wrote a simple program (which I called from an indicator through DLL) which tells me whether to buy or sell. The inout is a 5-minute data. But once I get a buy/sell signal, it keeps on calling DLL (nearly evry second) unless the indicatoor value changes.

     I just want the value to come once for every change in indicator.

     Is my understanding of metastock's functionalities is wrong or am i using it worngly?

     Will post code if anyine inteested.

    Cheers
    SY
  •  04-25-2009, 19:40 29552 in reply to 29551

    Re: Indicator (and my code) called multiple times till value changes

    SY,

    MS is a fully-evaluated program; do a search if you don't understand the ramifications of this.  The easiest way to deal with this in your MSX code is to use a newBar trigger code to only signal the entry/exit on a newBar.


    wabbit Big Smile [:D]



    "The question of whether a computer can think is no more interesting than the question of whether a submarine can swim."
    Edsgar W. Dijkstra

     

    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 :
    My SkyPE account : wabbit.com.au

View as RSS news feed in XML