PureBytes Links
Trading Reference Links
|
AceTrader:
>Thanks a lot. It seem to me that there are many way to generate random
>entry. Is there any way to ensure a better random entry or exit
>method to be used?
What do you mean by "better"? The fact that the entries and/or exits
are random means that you're interested in the worst, not the best!
Well, actually the "worst" would be to have 100% reliable signals
that you trade the wrong direction, but if we knew how to do that,
we wouldn't need to bother with analysis based on random entries.
:-)
I think probably the best way to do this is to generate a string of
random numbers in a file, each number corresponding to a trading bar
(meaning you need dates and maybe times), and read the file into
a TS data stream like data2. Now you have a sequence of random
numbers that will not change from run to run, so you can make valid
comparisons of strategies using random entries or exits.
All you'd do is use "Close data2" instead of "random() to get a
random number. If you need more than one random number per bar,
then you would import another data stream of random numbers, or you
could use the first random number as a lookback for the second, as
in "close[close data2] data2" -- provided the random numbers are
integers between 0 and MaxBarsBack.
This would be better than using the random() function which will
give you different results every time you recalculate the strategy.
-Alex
|