Hi everyone,
Wondered if anyone could help me fix an error in the following code? There seems to be an array index issue.
Many thanks
Jim
// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
// Prevents the system from placing new orders on specified days of the week
daysForbiddenEntry = OpenDayOfWeek = 6
// Conditions to enter long positions
ignored, ignored, ignored, indicator1 = CALL "[Hq_Renko]_v3"[5, 100, 150, 3, 1, 1, 1, 1, 1, 5, 0, 1, 1, 0, 0, 1, 1000, 0, 14, 1, 1, 7, 19, 0, 0.5, 1](close)
c1 = (indicator1 = 1)
IF c1 AND not daysForbiddenEntry THEN
BUY 2 PERPOINT AT MARKET
ENDIF
// Conditions to enter short positions
ignored, ignored, ignored, indicator2 = CALL "[Hq_Renko]_v3"[5, 100, 150, 3, 1, 1, 1, 1, 1, 5, 0, 1, 1, 0, 0, 1, 1000, 0, 14, 1, 1, 7, 19, 0, 0.5, 1](close)
c2 = (indicator2 = -1)
IF c2 AND not daysForbiddenEntry THEN
SELLSHORT 2 PERPOINT AT MARKET
ENDIF