Profile Picture

Calculating Price Change Between Two Bars Using DnD

Posted By davidfw1866 10 Years Ago
Rated 5 stars based on 1 vote.
Message
Posted Thursday April 26 2007
As part of a trading system that I am creating, I want to be able to enter a trade if the absolute difference between the current bar's close and the previous bar's close is greater than 2.5%.

If the current bar closed down more than 2.5% relative to the previous bar's close, go long.
If the current bar closed up more than 2.5% relative to the previous bar's close, go short.

The problem is that I do not know how to use the Drag-and-Drop (DnD) indicators to accomplish this.

a) I know that I have to set up a comparison between the current bar's close (i.e., Close) and the previous bar's close (i.e., Shift Series-1 Close).

b) I then have to divide the difference between the two closes by the previous bar's close to determine the price change. I then take the absolute value of the price change.

c) Once I know the price change in absolute terms, I can then compare it to a constant value of 2.5% to determine whether a trade should be entered.


In shorthand, these are the calculations:

If Input 1 (Close) < Input 2 (Shift Series -1 Close) AND
absolute value of (Input 1 - Input 2) / Input 2 > 2.5%,
GO LONG.

If Input 1 (Close) > Input 2 (Shift Series -1 Close) AND
absolute value of (Input 1 - Input 2) / Input 2 > 2.5%,
GO SHORT.


Help me use the DnD indicators to meet the objectives stated above.

Thanks.






5 stars.
Posted Thursday April 26 2007
Actually, you can use the Price ROC (Rate of Change) indicator in the momentum section for this.  Set the periods to 1.  If the value of this indicator is > 2.5, buy.  If it is less than -2.5, short.

Thanks,
Daniel

Posted Sunday April 29 2007
Daniel:

Thank you for calling my attention to the Price Rate of Change (PROC) indicator.


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems