From-to-range Trouble

#1
Dear all,

I'm having strange results with this;

Buy = 1;

when historical data starts before the initial value of range.

It happens that ts never buys when historical symbol starts before the 'from' date.

if I add in the buy row a date reference, problem is solved:

buy = 1 and DateNum()>1000201 ;// same date of 'from to range' setting


correlated question:
is there an AFL instruction to put in the TS the from-to-range value?

thank you

cippo
 

mastermind007

Well-Known Member
#2
Dear all,

I'm having strange results with this;

Buy = 1;

when historical data starts before the initial value of range.

It happens that ts never buys when historical symbol starts before the 'from' date.

if I add in the buy row a date reference, problem is solved:

buy = 1 and DateNum()>1000201 ;// same date of 'from to range' setting


correlated question:
is there an AFL instruction to put in the TS the from-to-range value?

thank you

cippo
There is nothing odd in it and it is consistent with defined default behaviour. Default behaviour of Analysis is to weed out excess entries.

So lets assume your data started at XX, From-To dates in analysis were YY and ZZ

With Buy = 1, a entry was made at candle of XX itself and in all following candles, value of Buy was ignored and AFL kept looking for Sell. Since that never came long trade was not exited

There is a way for AFL to know the value of AA settings but there is no way for AA to control the settings unless of course you are willing to do a bit on non-standard stuff and embark on undocumented route.
 

trash

Well-Known Member
#3
Dear all,

I'm having strange results with this;

Buy = 1;

when historical data starts before the initial value of range.

It happens that ts never buys when historical symbol starts before the 'from' date.

if I add in the buy row a date reference, problem is solved:

buy = 1 and DateNum()>1000201 ;// same date of 'from to range' setting


correlated question:
is there an AFL instruction to put in the TS the from-to-range value?

thank you

cippo

I have no idea what you guys are talking about (again).

But if using this simple system it quite obviously respects the set from-to range and it enters and it exits, doesn't it.

Code:
SetOption( "HoldMinBars", 1 );
SetOption( "AllowSameBarExit", 0 );

Buy = 1;
Sell = 1;

I'm smelling a little bit of incompetence (again).... maybe?






is there an AFL instruction to put in the TS the from-to-range value?
See Status(..) function.
 
#4
dear All,
tks for your answer,
it was my mistake, I put an Exrem instruction after buy=1 raw:
buy=1;
buy = ExRem( buy, sell );

so, when the first buy occurred, out of the from-to date range, no new buy occurred inside the allowed trading period.
I thought the TS system didnt work at all in the not allowed period and so the buy signal would have occurred just inside the from-to date range.

thank you again for you attention.

Cippo
 
Last edited:

Similar threads