Page 1 of 1

_Single At-Mrkt En pre-built strategy

Posted: Nov 18 2019
by hysteresis
Below is a snippet from the pre-built strategy _Single At-Mrkt En and it is in other strategies as well.
A few questions for what do not understand:
1. the variable EntryBarDate_YYMMDD( 030102 ), seems to = January 2, 1903. Why? Also this is not the format of data that the Date function returns. Does it matter?

2. In var0, what is the point of ensuring that the minimum value is 500000?

3. How is condition1 ever true?

Code: Select all

inputs: LongOrShort( 1 ), Quantity( 1000 ), EntryBarDate_YYMMDD( 030102 ), EntryBarTime_HHMM( 1300 ) ; variables: var0( iff( EntryBarDate_YYMMDD < 500000, EntryBarDate_YYMMDD + 1000000, EntryBarDate_YYMMDD ) ) ; condition1 = Date next bar = var0 and ( BarType = 2 or ( BarType = 1 and Time next bar = EntryBarTime_HHMM ) ) ;

Re: _Single At-Mrkt En pre-built strategy  [SOLVED]

Posted: Nov 21 2019
by rrams
1. It's pre Y2k, uncommented, garbage code that is forced onto our system every time we do an update even after being deleted because a self managed code repository or even directory system with branches for anything other than signal, function and indicator has not been implemented yet.

2. The author was attempting to read dates that spanned 1950-2049 and enter a position in year 2003.

3. Don't worry about it. Instead; ask for some fully coded, commented, working systems to be included in the download package.