Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/botPage/common/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,14 @@ const config = {
RESETPUT: translate('Reset Put'),
},
],
RUNS: [
{
RUNHIGH: translate('Only Ups'),
},
{
RUNLOW: translate('Only Downs'),
},
],
},
barrierTypes: [['Offset +', '+'], ['Offset -', '-']],
ohlcFields : [
Expand Down Expand Up @@ -176,6 +184,7 @@ const config = {
digits : ['matchesdiffers', 'evenodd', 'overunder'],
highlowticks: ['highlowticks'],
reset : ['reset'],
runs : ['runs'],
},
conditionsCategoryName: {
callput : translate('Up/Down'),
Expand All @@ -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',
Expand All @@ -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'],
Expand Down
1 change: 1 addition & 0 deletions src/botPage/common/symbolApi/__tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand Down
4 changes: 2 additions & 2 deletions src/botPage/view/blockly/blocks/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down