One more thought, over your 5 min window you can have multiple peaks. Or, peak 
may be achieved after 1 minute and remain flat thereafter. Instead of using a 
fixed window, you may want to have an expanding window, up to a maximum size of 
5 minutes. 





________________________________
From: Astor <[email protected]>
To: [email protected]
Sent: Wed, December 22, 2010 7:26:58 AM
Subject: Re: [JBookTrader] peak and reversal detection -> help needed



Over your window of interest, i,e.5 min, compute two ratios

rise = (max - first)/(max - min)
fall = (max - last)/(max - min)

The values of the above ratios will be between 0 and 1. The first ratio will 
tell you if the tension has been rising and how much. The second if it 
subsequently fell and how much. Define thresholds for each ratio that are 
meanignful to you (I would recommend using some multiple of the standard 
deviation of the tension over the window to avoid spurious signals due to 
changing volatility). 

IF rise > threshold and fall > threshold THEN peak = true

 



________________________________
From: new_trader <[email protected]>
To: JBookTrader <[email protected]>
Sent: Wed, December 22, 2010 5:24:02 AM
Subject: [JBookTrader] peak and reversal detection -> help needed

can anybody give me some hints on how to implement a peak and reversal
detection?

the idea behind this: the current strategies like Defender look if
some entry and exit criterions are met.
this is done by simple comparison: if(tension>= entry) setPosition(1);

I want to add an additional crtiterion.
I want to look if tension was rising for the last 5 minutes and has
reached a peak and now is falling. In the chart you see this as a
reversal of tension. if this "chart pattern" is detected and some
other conditions are met then a position can be opened. So I need a
pattern detector which detects the reversal of tension.

can anybody give me some hints how such a thing can be implemented?



I hope I have described it in an understandable way :-)

-- 
You received this message because you are subscribed to the Google Groups 
"JBookTrader" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jbooktrader?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
"JBookTrader" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jbooktrader?hl=en.



      

-- 
You received this message because you are subscribed to the Google Groups 
"JBookTrader" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jbooktrader?hl=en.

Reply via email to