Australian (ASX) Stock Market Forum

Daily bar becoming both an entry bar and an exit bar

Joined
12 April 2009
Posts
16
Reactions
4
Hi All ,
Part of my code has this line looking for an exit signal , ExitSignal = Close > Open , so a green up bar. Sometimes there can be a green up bar also creating an entry signal as it hits a limit price entry order .
This is all in Amibroker AFL code . would it be possible for anyone to suggest some code that would prevent the daily bar from creating a entry signal after it has created an entry signal.
Thanks for any help or comments
michael b
 

Attachments

  • Test  20.png
    Test 20.png
    51.9 KB · Views: 6
There are a myriad of ways to add to the code
a few suggestions
(1) buy next open if condition is true
(2) but at a percentage over previous close if condition is true.
(3) use a different timeframe 2 or 3 day bars ( out of the square!)

There will be many others
 
There are a myriad of ways to add to the code
a few suggestions
(1) buy next open if condition is true
(2) but at a percentage over previous close if condition is true.
(3) use a different timeframe 2 or 3 day bars ( out of the square!)

There will be many others
Thanks for the reply , the entry is a limit buy order under the previous close and yes there are agzillion other methods and one method of exit is when a daily bar has its close above the open and yes there are a gzillion methods of exiting a trade , so as backtesting I was trying to negate the entry bar having both an entry and exit signal Thanks for your comments and suggestions

cheers

michael b
 
Michael
an error most fall for is using the bar of the day triggered
for exactly the same reason you have found .
further your trigger may come and be negated by the time of the close on the day of the trigger
depending on what your entry is.
hence the suggestions ,
Unless you have a delay you can’t negate what’s happened on the same bar as it’s dynamic until the close. It can show a buy before the auction and be negated at the closing auction or vice versa.
 
Michael
an error most fall for is using the bar of the day triggered
for exactly the same reason you have found .
further your trigger may come and be negated by the time of the close on the day of the trigger
depending on what your entry is.
hence the suggestions ,
Unless you have a delay you can’t negate what’s happened on the same bar as it’s dynamic until the close. It can show a buy before the auction and be negated at the closing auction or vice versa.
Hi Tech ,
OK , thanks for the detailed explanation
cheers

michael b
 
Top