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

Questions about MultiCharts and user contributed studies.
Posts: 3
Joined: 29 Aug 2019
Has thanked: 1 time

_Single At-Mrkt En pre-built strategy

Postby hysteresis » 18 Nov 2019

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 ) ) ;

User avatar
Posts: 129
Joined: 10 Feb 2011
Location: USA
Has thanked: 7 times
Been thanked: 70 times

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

Postby rrams » 21 Nov 2019

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.

Return to “MultiCharts”