Hello,

 > Reference into future by using Ref, e.g. Ref(open,1)
YOU SHOULD NOT do that !

If you are using ANY other price than OPEN anywhere in your 
calculation/formula,
your SetTradeDelays should be:

SetTradeDelays( 1, 1, 1, 1 );

OR
you should DELAY manually all signals using

Buy = ref( Buy, -1 );
Sell = ref( Sell, -1 );
Short = Ref( Short, -1 );
Cover = Ref( Cover, -1 );

(Net effect is identical)

You should NEVER EVER use
BuyPrice/SellPrice/CoverPrice/ShortPrice
to assign artificial price (i.e. outside H-L range).
These variables are provided SOLELY to simulate limit / stop orders
that lay WITHIN H-L range, or to do robustness testing by simulate worst 
case scenarios
(like buying high selling low of the bar, or adding noise to prices).

Referencing future is forbidden in trading systems.
Use Formula Editor "Check and profile" function to check if your formula
references future. If it does you should immediatelly remove all statements
referencing future!

Best regards,
Tomasz Janeczko
amibroker.com

On 2010-04-17 12:34, trade_two_live wrote:
> Reference into future by using Ref, e.g. Ref(open,1)
>
> You will probably notice that you get a significant number of fewer 
> trades. In my case the backtester added a lot of very good 1 day trades.
>

Reply via email to