trading_system_1.epl: units is now BigDecimal

This commit is contained in:
2019-02-12 10:13:25 -08:00
parent bf69120753
commit 7cec81d06b

View File

@ -23,7 +23,7 @@ create constant variable string OHLCInterval = '10s'
create constant variable int OHLCTicks = 100 create constant variable int OHLCTicks = 100
-- Amount to be traded, measured in units. -- Amount to be traded, measured in units.
create constant variable int TradeSize = 10 create constant variable BigDecimal TradeSize = new BigDecimal(10)
-- How large is a pip? -- How large is a pip?
create constant variable BigDecimal PipSize = new BigDecimal(0.0001) create constant variable BigDecimal PipSize = new BigDecimal(0.0001)
@ -251,7 +251,7 @@ create schema LongEntryDistinct
as (current BigDecimal, as (current BigDecimal,
time DateTime, time DateTime,
instrument String, instrument String,
units int) units BigDecimal)
insert into LongEntryDistinct insert into LongEntryDistinct
select le.current as current, le.time as time, select le.current as current, le.time as time,
@ -315,11 +315,11 @@ insert into LongEntryPreEntryBarPrevLow select prev(1, low) as low
-- --
-- Long exit event definition -- Long exit event definition
create schema LongExitStream -- create schema LongExitStream
as (current BigDecimal, -- as (current BigDecimal,
time DateTime, -- time DateTime,
instrument String, -- instrument String,
units int) -- units BigDecimal)
-- The long exit calc below is translated from this entry in the -- The long exit calc below is translated from this entry in the
-- spreadsheet: -- spreadsheet: