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 backtest or plot a script, which uses 
SelectedValue or LastValue?


    
  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 that the PEAK occurred until many bars AFTER the fact.

  You can call it "expected lag" and I am calling it "looking into the 
  future", both having same net effect
  - the result is useless for profitable trading, as useless as knowing 
  what kind of market cycle we had one year ago.
  You can not profit from the information that is several bars (days) old.

  For me this ends this purely academic discussion.

  Best regards,
  Tomasz Janeczko
  amibroker.com

  On 2010-04-26 23:43, jhnlmn wrote:
  >
  > Hi,
  >
  > 
  >> You admit that you are complete novice, yet you make definitive statements 
...
  >> 
  > Sure. This is because I wrote a script, which generates exactly the same 
output as Peak/Trough in WL.
  > So, I know for sure that this script does not use a Zigzag (WL simply does 
not have this indicator)
  > and it does not look into the future, that is when I call TroughBars[bar] I 
do know that it does not
  > use any bars with indexes> bar. So, it does not look into the future, but 
have some lag,
  > which is expected. Please, correct me if I am wrong.
  >
  > 
  >> (i.e. you must look at bars that occur AFTER THE PEAK) and find out that 
the price moved in opposite
  >> 
  > Sure, but I never look AFTER THE BAR when I call TroughBars[bar]. 
Therefore, my script does not look into the future. That is, it will generate 
exactly the same answer no matter whether bar is the last in the series or some 
time later when bar will be in the middle of historical data.
  >
  > 
  >> Finding "that reversal happens" is where looking into the future occurs.
  >> 
  > No. The script never looks after the BAR, but, of course, it does look 
after the peak if the peak is in the past.
  >
  >
  > 
  >> *IS* actually zig-zag algorithm and that peak and trough functions are 
_products_ of zig-zag algorithm.
  >> 
  > This may be true, but it is not really important. It does not matter how a 
particular trading program chose to name each function. It is more important 
what exactly the function does, in particular whether it does look into the 
future, that is when I call TroughBars[bar] will it look after the bar or not? 
And here, if I understood you correctly, AB is profoundly different from WL 
because in WL TroughBars[bar] does NOT touch any data after bar, but AB does.
  >
  > 
  >> You can not simply remove SelectedValue from such formula because it 
relied on manual input
  >> 
  > Of course. I stated this in my original question.
  >
  > 
  >> In order to remove SelectedValue you would need to come up first with
  >> conditions that say when to start and when to end the trendline because it 
is not always obvious.
  >> 
  > I already did that in my post
  > http://finance.groups.yahoo.com/group/amibroker/message/148924
  > I, as well as other users, found it very difficult to understand AB 
array-based language,
  > so it is very likely that I made some mistake in my rewritten scripts.
  > So, I would appreciate if somebody with experience will comment on it.
  >
  > Thank you
  > John
  >
  >
  >
  >
  >
  >
  > ------------------------------------
  >
  > **** IMPORTANT PLEASE READ ****
  > This group is for the discussion between users only.
  > This is *NOT* technical support channel.
  >
  > TO GET TECHNICAL SUPPORT send an e-mail directly to
  > SUPPORT {at} amibroker.com
  >
  > TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
  > http://www.amibroker.com/feedback/
  > (submissions sent via other channels won't be considered)
  >
  > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
  > http://www.amibroker.com/devlog/
  >
  > Yahoo! Groups Links
  >
  >
  >
  >
  > 


  

Reply via email to