diff --git a/gulp/build.js b/gulp/build.js index 7439507e9b..30ebffc806 100644 --- a/gulp/build.js +++ b/gulp/build.js @@ -16,6 +16,9 @@ const getConfig = prefix => ({ binary_style_img: 'image/binary-style', elevio_script : '', + gtm_head : ' ', + gtm_iframe: + ' ', }); const genHtml = min => diff --git a/src/botPage/common/const.js b/src/botPage/common/const.js index bd4b246509..dce8ceaeba 100644 --- a/src/botPage/common/const.js +++ b/src/botPage/common/const.js @@ -141,6 +141,14 @@ const config = { RESETPUT: translate('Reset Put'), }, ], + RUNS: [ + { + RUNHIGH: translate('Only Ups'), + }, + { + RUNLOW: translate('Only Downs'), + }, + ], }, barrierTypes: [['Offset +', '+'], ['Offset -', '-']], ohlcFields : [ @@ -176,6 +184,7 @@ const config = { digits : ['matchesdiffers', 'evenodd', 'overunder'], highlowticks: ['highlowticks'], reset : ['reset'], + runs : ['runs'], }, conditionsCategoryName: { callput : translate('Up/Down'), @@ -187,6 +196,7 @@ const config = { staysinout : translate('Stays In/Goes Out'), highlowticks: translate('High/Low Ticks'), reset : translate('Reset Call/Reset Put'), + runs : translate('Only Ups/Only Downs'), }, conditions: [ 'risefall', @@ -203,7 +213,7 @@ const config = { barrierCategories: { euro_atm : ['callput', 'risefall', 'risefallequals'], euro_non_atm : ['endsinout', 'higherlower'], - american : ['staysinout', 'touchnotouch', 'highlowticks'], + american : ['staysinout', 'touchnotouch', 'highlowticks', 'runs'], non_financial: ['digits', 'overunder', 'evenodd', 'matchesdiffers'], asian : ['asian'], reset : ['reset'], diff --git a/src/botPage/common/symbolApi/__tests__/index.js b/src/botPage/common/symbolApi/__tests__/index.js index 949f6ceaee..df01c7e08e 100644 --- a/src/botPage/common/symbolApi/__tests__/index.js +++ b/src/botPage/common/symbolApi/__tests__/index.js @@ -25,6 +25,7 @@ describe('symbol', () => { 'Stays In/Goes Out', 'High/Low Ticks', 'Reset Call/Reset Put', + 'Only Ups/Only Downs', ]); expect(symbol.getAllowedCategoryNames('FAKE')).to.be.empty; }); diff --git a/src/botPage/view/blockly/blocks/shared.js b/src/botPage/view/blockly/blocks/shared.js index a2ed49c817..f0151c106f 100644 --- a/src/botPage/view/blockly/blocks/shared.js +++ b/src/botPage/view/blockly/blocks/shared.js @@ -353,8 +353,8 @@ export const getBarriersForContracts = (contracts, selectedContractType, selecte }) .shift(); } - const barrierlessCategories = ['reset']; - if (contract && !barrierlessCategories.includes(contract.barrier_category)) { + const barrierlessCategories = ['reset', 'runs']; + if (contract && !barrierlessCategories.includes(contract.contract_category)) { const propName = contract.barriers === 1 ? 'barrier' : barrierProps[index]; if (contract[propName]) { const barrierMatch = contract[propName].toString().match(offsetRegex); diff --git a/templates/bot.mustache b/templates/bot.mustache index 339b21e47d..a05359fd65 100644 --- a/templates/bot.mustache +++ b/templates/bot.mustache @@ -7,6 +7,7 @@ {{> bundle_css }} {{> bot_css }} + {{> gtm_head }} @@ -175,6 +176,7 @@ {{> bundle}} {{> bot}} {{> elevio_script }} + {{> gtm_iframe }}
diff --git a/templates/index.mustache b/templates/index.mustache index dbc39e3e1d..9271a2c46a 100644 --- a/templates/index.mustache +++ b/templates/index.mustache @@ -8,6 +8,7 @@ {{> index_css }} +{{> gtm_head }} @@ -51,6 +52,7 @@ - {{> index}} + {{> index}} + {{> gtm_iframe }}