Re: [amibroker] Re: How to backtest or plot a script, which uses SelectedValue or LastValue?

2010-04-30 Thread Tomasz Janeczko
Hello, Yes the answer was: SelectedValue and LastValue functions are used because the point(s) were you draw trendline is subjective matter and these functions are used to establish a pattern location MANUALLY and subjectively. Removing those functions would involve first replacing subjective

Re: [amibroker] Re: How to backtest or plot a script, which uses SelectedValue or LastValue?

2010-04-30 Thread Tomasz Janeczko
Hello, As written in the manual: http://www.amibroker.com/f?lastvalue Returns last calculated value of the specified ARRAY [..] Caveat: since this function fills an entire data array with the last value of another array, it allows a formula to look into the future. So if your chart (or

Re: [amibroker] Re: How to backtest or plot a script, which uses SelectedValue or LastValue?

2010-04-27 Thread Ton Sieverding
Tomasz how do I calculate this 'Expected Lag' in Bars? So how do I know when the Peak/Through is true ? Regards, Ton. - Original Message - From: Tomasz Janeczko To: amibroker@yahoogroups.com Sent: Tuesday, April 27, 2010 12:59 AM Subject: Re: [amibroker] Re: How to

Re: [amibroker] Re: How to backtest or plot a script, which uses SelectedValue or LastValue?

2010-04-27 Thread Tomasz Janeczko
Hello, This has been answered already in my previous response in this thread: http://finance.groups.yahoo.com/group/amibroker/message/148933 (It was back in 2003 http://www.amibroker.com/members/traders/11-2003.html when the formula was provided in the Traders' Tips section that: a) shows how

Re: [amibroker] Re: How to backtest or plot a script, which uses SelectedValue or LastValue?

2010-04-27 Thread Ton Sieverding
Thanks Tomasz. Yes I've found that thread. I still have problems with the 'Amount' variable for the ZIG. Should not this be a percentage ? Anyway I have got my 'Expected Lag' in Bars. Thanks again ... Regards, Ton. - Original Message - From: Tomasz Janeczko To:

Re: [amibroker] Re: How to backtest or plot a script, which uses SelectedValue or LastValue?

2010-04-27 Thread Tomasz Janeczko
Hello, Yes 'amount' is expressed in percent. For example 15.5 set via Params window means 15.5%. Best regards, Tomasz Janeczko amibroker.com On 2010-04-27 12:23, Ton Sieverding wrote: Thanks Tomasz. Yes I've found that thread. I still have problems with the 'Amount' variable for the ZIG.

Re: [amibroker] Re: How to backtest or plot a script, which uses SelectedValue or LastValue?

2010-04-27 Thread Ton Sieverding
OK and thanks ... Ton. - Original Message - From: Tomasz Janeczko To: amibroker@yahoogroups.com Sent: Tuesday, April 27, 2010 12:29 PM Subject: Re: [amibroker] Re: How to backtest or plot a script, which uses SelectedValue or LastValue? Hello, Yes 'amount' is

Re: [amibroker] Re: How to backtest or plot a script, which uses SelectedValue or LastValue?

2010-04-27 Thread Tomasz Janeczko
Hello, jhnlmn wrote: Yes. This is a big problem in AB (in my opinion). In WL I execute the script only once and it keeps the graph and all indicators in memory, so I can view them without rerunning But AB reruns the script each time I click the graph, which makes viewing very slow. What

Re: [amibroker] Re: How to backtest or plot a script, which uses SelectedValue or LastValue?

2010-04-26 Thread Tomasz Janeczko
Hello, You still don't understand anything about zigzag algorithm. If you did you will know that to generate zig you must look into future bars. I am saying that Wealth Lab use *THE SAME* algorithm as ANY other software, there is no magic and no secret in it. First it calculates REGULAR zig

Re: [amibroker] Re: How to backtest or plot a script, which uses SelectedValue or LastValue?

2010-04-26 Thread Tomasz Janeczko
See also this: http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:zigzag Take closer look at this sentence The ZigZag has zero predictive power and draws lines base on hindsight. (hindsight in technical analysis is equivalent to looking into the future). On

Re: [amibroker] Re: How to backtest or plot a script, which uses SelectedValue or LastValue?

2010-04-26 Thread Tomasz Janeczko
Hello, You admit that you are complete novice, yet you make definitive statements like this: It simply loops from 0 to the bar and finds min and max. Then, after a reversal happens, it assigns the last min or max to an array. That's all. You simply see the trees but you don't see the forest.

Re: [amibroker] Re: How to backtest or plot a script, which uses SelectedValue or LastValue?

2010-04-26 Thread Tomasz Janeczko
Hello, The script never looks after the BAR, but, of course, it does look after the peak if the peak is in the past. This is *exactly* looking into the future. You can only claim a peak when you look several bars AFTER the peak - that is looking into the future in purest form. You don't know

Re: [amibroker] Re: How to backtest or plot a script, which uses SelectedValue or LastValue?

2010-04-25 Thread Tomasz Janeczko
Hello, Clearly you did not read the manual of Wealth-Lab carefully enough. check page 240 of their manual and you will read the following: The Peak function never looks ahead in time, but always returns the Peak value as it would have been determined as of the specified bar. *For this reason,