_Single At-Mrkt En pre-built strategy
Posted: Nov 18 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?
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 ) ) ;