From 3bf907b7531d8f4af09ee9dddb98fef6d31e2ffe Mon Sep 17 00:00:00 2001 From: rupato-deriv Date: Tue, 12 Nov 2024 19:17:05 +0800 Subject: [PATCH] fix: added max stake and max ticks on popover --- ..._stat_reset_with_tick_count_take_profit.ts | 198 ++++ ..._dalembert_with_tick_count_take_profit.ts} | 2 +- ..._stat_reset_with_tick_count_take_profit.ts | 198 ++++ ..._martingale_with_tick_count_take_profit.ts | 198 ++++ .../src/constants/quick-strategies/index.ts | 5 +- .../bot-builder/quick-strategy/config.ts | 92 +- .../form-wrappers/desktop-form-wrapper.tsx | 3 +- .../form-wrappers/mobile-form-wrapper.tsx | 2 +- .../upgraded-qs-v2/trade-constants.ts | 26 +- .../pages/bot-builder/quick-strategy/form.tsx | 10 +- .../quick-strategy/inputs/qs-input-label.tsx | 7 +- .../quick-strategy/localize_html.tsx | 20 +- .../quick-strategy/quick-strategy.scss | 3 +- .../selects/growth-rate-type.tsx | 4 +- .../quick-strategy/selects/symbol.tsx | 7 +- .../quick-strategy/selects/trade-type.tsx | 7 +- .../src/stores/quick-strategy-store.ts | 11 + ...stat_reset_with_tick_count_take_profit.xml | 987 ++++++++++++++++++ ...dalembert_with_tick_count_take_profit.xml} | 0 ...stat_reset_with_tick_count_take_profit.xml | 945 +++++++++++++++++ ...martingale_with_tick_count_take_profit.xml | 928 ++++++++++++++++ 21 files changed, 3623 insertions(+), 30 deletions(-) create mode 100644 packages/bot-web-ui/src/constants/quick-strategies/accumulators_dalembert_on_stat_reset_with_tick_count_take_profit.ts rename packages/bot-web-ui/src/constants/quick-strategies/{accumulators_dalembert.ts => accumulators_dalembert_with_tick_count_take_profit.ts} (98%) create mode 100644 packages/bot-web-ui/src/constants/quick-strategies/accumulators_martingale_on_stat_reset_with_tick_count_take_profit.ts create mode 100644 packages/bot-web-ui/src/constants/quick-strategies/accumulators_martingale_with_tick_count_take_profit.ts create mode 100644 packages/bot-web-ui/src/xml/accumulators_dalembert_on_stat_reset_with_tick_count_take_profit.xml rename packages/bot-web-ui/src/xml/{accumulators_dalembert.xml => accumulators_dalembert_with_tick_count_take_profit.xml} (100%) create mode 100644 packages/bot-web-ui/src/xml/accumulators_martingale_on_stat_reset_with_tick_count_take_profit.xml create mode 100644 packages/bot-web-ui/src/xml/accumulators_martingale_with_tick_count_take_profit.xml diff --git a/packages/bot-web-ui/src/constants/quick-strategies/accumulators_dalembert_on_stat_reset_with_tick_count_take_profit.ts b/packages/bot-web-ui/src/constants/quick-strategies/accumulators_dalembert_on_stat_reset_with_tick_count_take_profit.ts new file mode 100644 index 000000000000..30c26043ea30 --- /dev/null +++ b/packages/bot-web-ui/src/constants/quick-strategies/accumulators_dalembert_on_stat_reset_with_tick_count_take_profit.ts @@ -0,0 +1,198 @@ +import { getImageLocation } from '../../public-path'; +import { localize } from '@deriv/translations'; +import { TDescriptionItem } from '../../pages/bot-builder/quick-strategy/types'; + +// TODO: Added dummy description because it has dependency with tutorial sections +export const ACCUMULATORS_DALEMBERT_ON_STAT_RESET_WITH_TICK_COUNT_TAKE_PROFIT: TDescriptionItem[] = [ + { + type: 'subtitle', + content: [localize('Exploring the D’Alembert strategy in Deriv Bot')], + expanded: true, + no_collapsible: false, + }, + { + type: 'text', + content: [ + localize( + "The D'Alembert strategy involves increasing your stake after a losing trade and reducing it after a successful trade by a predetermined number of units." + ), + ], + }, + { + type: 'subtitle', + content: [localize('Key parameters')], + }, + { + type: 'text', + content: [localize('These are the trade parameters used for D’Alembert strategy in Deriv Bot.')], + }, + { + type: 'text', + content: [ + localize( + 'Initial stake: The amount that you are willing to place as a stake to enter a trade. This is the starting point for any changes in stake depending on the dynamic of the strategy being used.' + ), + ], + }, + { + type: 'text', + content: [ + localize( + 'Unit: The number of units that are added in the event of a trade resulting in loss or the number of units removed in the event of a trade resulting in profit. For example, if the unit is set at 2, the stake increases or decreases by two times the initial stake of 1 USD, meaning it changes by 2 USD.' + ), + ], + }, + { + type: 'text', + content: [ + localize( + 'Profit threshold: The bot will stop trading if your total profit exceeds this amount.' + ), + ], + }, + { + type: 'text', + content: [ + localize( + 'Loss threshold: The bot will stop trading if your total loss exceeds this amount.' + ), + ], + }, + { + type: 'subtitle', + content: [localize('An example of D’Alembert strategy')], + }, + { + type: 'media', + src: getImageLocation('dalembert.svg'), + alt: localize("An example of D’Alembert's Grind strategy"), + }, + { + type: 'text', + content: [ + localize('1. Start with the initial stake. In this example, we’ll use 1 USD.'), + localize('2. Set your preferred unit. In this example, it is 2 units or 2 USD.'), + localize( + '3. If the first trade results in profit, the stake for the following trade will not reduce but remain at the initial stake. The strategy minimally trades at the initial stake of 1 USD. See A1.' + ), + localize( + '4. If the second trade results in a loss, the Deriv Bot will automatically increase your stake for the next trade by 2 USD. Deriv Bot will continue to add 2 USD to the previous round’s stake after every losing trade. See A2.' + ), + localize( + '5. If the next trades are profitable, the stake for the following trade will be reduced by 2 USD. This can be shown above where the stake of 3 USD is reduced to 1 USD. See A3.' + ), + ], + }, + { + type: 'subtitle', + content: [localize('Profit and loss thresholds')], + }, + { + type: 'text', + content: [ + localize( + "With Deriv Bot, traders can set the profit and loss thresholds to secure potential profits and limit potential losses. This means that the trading bot will automatically stop when either the profit or loss thresholds are reached. It's a form of risk management that can potentially enhance returns. For example, if a trader sets the profit threshold at 100 USD and the strategy exceeds 100 USD of profit from all trades, then the bot will stop running." + ), + ], + }, + { + type: 'subtitle', + content: [localize('Estimating the lifespan of your trades')], + }, + { + type: 'text', + content: [ + localize( + 'The D’Alembert strategy is less risky than Martingale, but you can still determine how long your funds will last with this strategy before trading. Simply use this formula.' + ), + ], + }, + { + type: 'media', + src: getImageLocation('dalembert_formula_1.svg'), + dark_src: getImageLocation('dalembert_formula_dark_1.svg'), + alt: localize('D’Alembert formula 1'), + className: 'formula', + styles: { height: '6rem' }, + }, + { + type: 'text', + content: [ + localize('Where:'), + localize('R is the number of rounds a trader can sustain given a specific loss threshold.'), + localize('B is the loss threshold.'), + localize('s is the initial stake.'), + localize('f is the unit increment.'), + ], + className: 'no-margin', + }, + { + type: 'text', + content: [ + localize( + 'For instance, if a trader has a loss threshold (B) of 100 USD, with an initial stake (s) of 1 USD and 2 units of increment (f), the calculation would be as follows:' + ), + ], + className: 'top-margin', + }, + { + type: 'media', + src: getImageLocation('dalembert_formula_2.svg'), + dark_src: getImageLocation('dalembert_formula_dark_2.svg'), + alt: localize('D’Alembert formula 2'), + className: 'formula', + styles: { height: '6rem' }, + }, + { + type: 'text', + content: [localize('Number of rounds (R) = 10')], + }, + { + type: 'text', + content: [ + localize( + 'This means after 10 rounds of consecutive losses, this trader will lose 100 USD. This reaches the loss threshold of 100 USD, stopping the bot.' + ), + ], + }, + { + type: 'text', + content: [ + localize( + 'This formula helps you plan your trades by considering the amount of money you have and your comfort level with risk. It involves determining your loss threshold and the initial stake you want to trade with. Then, you use this formula to calculate the number of rounds you can trade. This process provides insight into stake sizing and expectations.' + ), + ], + }, + { + type: 'subtitle', + content: [localize('Summary')], + }, + { + type: 'text', + content: [ + localize( + "The D'Alembert system offers more balanced trading through controlled stake progression. With prudent risk management like stake limits, it can be effectively automated in Deriv Bot. However, traders should thoroughly assess their risk appetite, test strategies on a demo account to align with their trading style before trading with real money. This allows optimising the approach and striking a balance between potential gains and losses whilst managing risk." + ), + ], + }, + { + type: 'text_italic', + content: [localize('Disclaimer:')], + }, + { + type: 'text_italic', + content: [ + localize( + 'Please be aware that while we may use rounded figures for illustration, a stake of a specific amount does not guarantee an exact amount in successful trades. For example, a 1 USD stake does not necessarily equate to a 1 USD profit in successful trades.' + ), + ], + }, + { + type: 'text_italic', + content: [ + localize( + 'Trading inherently involves risks, and actual profits can fluctuate due to various factors, including market volatility and other unforeseen variables. As such, exercise caution and conduct thorough research before engaging in any trading activities.' + ), + ], + }, +]; diff --git a/packages/bot-web-ui/src/constants/quick-strategies/accumulators_dalembert.ts b/packages/bot-web-ui/src/constants/quick-strategies/accumulators_dalembert_with_tick_count_take_profit.ts similarity index 98% rename from packages/bot-web-ui/src/constants/quick-strategies/accumulators_dalembert.ts rename to packages/bot-web-ui/src/constants/quick-strategies/accumulators_dalembert_with_tick_count_take_profit.ts index f0277651e5d2..d942302c9fd5 100644 --- a/packages/bot-web-ui/src/constants/quick-strategies/accumulators_dalembert.ts +++ b/packages/bot-web-ui/src/constants/quick-strategies/accumulators_dalembert_with_tick_count_take_profit.ts @@ -3,7 +3,7 @@ import { localize } from '@deriv/translations'; import { TDescriptionItem } from '../../pages/bot-builder/quick-strategy/types'; // TODO: Added dummy description because it has dependency with tutorial sections -export const ACCUMULATORS_DALEMBERT: TDescriptionItem[] = [ +export const ACCUMULATORS_DALEMBERT_WITH_TICK_COUNT_TAKE_PROFIT: TDescriptionItem[] = [ { type: 'subtitle', content: [localize('Exploring the D’Alembert strategy in Deriv Bot')], diff --git a/packages/bot-web-ui/src/constants/quick-strategies/accumulators_martingale_on_stat_reset_with_tick_count_take_profit.ts b/packages/bot-web-ui/src/constants/quick-strategies/accumulators_martingale_on_stat_reset_with_tick_count_take_profit.ts new file mode 100644 index 000000000000..c0c01eed4ff5 --- /dev/null +++ b/packages/bot-web-ui/src/constants/quick-strategies/accumulators_martingale_on_stat_reset_with_tick_count_take_profit.ts @@ -0,0 +1,198 @@ +import { getImageLocation } from '../../public-path'; +import { localize } from '@deriv/translations'; +import { TDescriptionItem } from '../../pages/bot-builder/quick-strategy/types'; + +// TODO: Added dummy description because it has dependency with tutorial sections +export const ACCUMULATORS_MARTINGALE_ON_STAT_RESET_WITH_TICK_COUNT_TAKE_PROFIT: TDescriptionItem[] = [ + { + type: 'subtitle', + content: [localize('Exploring the D’Alembert strategy in Deriv Bot')], + expanded: true, + no_collapsible: false, + }, + { + type: 'text', + content: [ + localize( + "The D'Alembert strategy involves increasing your stake after a losing trade and reducing it after a successful trade by a predetermined number of units." + ), + ], + }, + { + type: 'subtitle', + content: [localize('Key parameters')], + }, + { + type: 'text', + content: [localize('These are the trade parameters used for D’Alembert strategy in Deriv Bot.')], + }, + { + type: 'text', + content: [ + localize( + 'Initial stake: The amount that you are willing to place as a stake to enter a trade. This is the starting point for any changes in stake depending on the dynamic of the strategy being used.' + ), + ], + }, + { + type: 'text', + content: [ + localize( + 'Unit: The number of units that are added in the event of a trade resulting in loss or the number of units removed in the event of a trade resulting in profit. For example, if the unit is set at 2, the stake increases or decreases by two times the initial stake of 1 USD, meaning it changes by 2 USD.' + ), + ], + }, + { + type: 'text', + content: [ + localize( + 'Profit threshold: The bot will stop trading if your total profit exceeds this amount.' + ), + ], + }, + { + type: 'text', + content: [ + localize( + 'Loss threshold: The bot will stop trading if your total loss exceeds this amount.' + ), + ], + }, + { + type: 'subtitle', + content: [localize('An example of D’Alembert strategy')], + }, + { + type: 'media', + src: getImageLocation('dalembert.svg'), + alt: localize("An example of D’Alembert's Grind strategy"), + }, + { + type: 'text', + content: [ + localize('1. Start with the initial stake. In this example, we’ll use 1 USD.'), + localize('2. Set your preferred unit. In this example, it is 2 units or 2 USD.'), + localize( + '3. If the first trade results in profit, the stake for the following trade will not reduce but remain at the initial stake. The strategy minimally trades at the initial stake of 1 USD. See A1.' + ), + localize( + '4. If the second trade results in a loss, the Deriv Bot will automatically increase your stake for the next trade by 2 USD. Deriv Bot will continue to add 2 USD to the previous round’s stake after every losing trade. See A2.' + ), + localize( + '5. If the next trades are profitable, the stake for the following trade will be reduced by 2 USD. This can be shown above where the stake of 3 USD is reduced to 1 USD. See A3.' + ), + ], + }, + { + type: 'subtitle', + content: [localize('Profit and loss thresholds')], + }, + { + type: 'text', + content: [ + localize( + "With Deriv Bot, traders can set the profit and loss thresholds to secure potential profits and limit potential losses. This means that the trading bot will automatically stop when either the profit or loss thresholds are reached. It's a form of risk management that can potentially enhance returns. For example, if a trader sets the profit threshold at 100 USD and the strategy exceeds 100 USD of profit from all trades, then the bot will stop running." + ), + ], + }, + { + type: 'subtitle', + content: [localize('Estimating the lifespan of your trades')], + }, + { + type: 'text', + content: [ + localize( + 'The D’Alembert strategy is less risky than Martingale, but you can still determine how long your funds will last with this strategy before trading. Simply use this formula.' + ), + ], + }, + { + type: 'media', + src: getImageLocation('dalembert_formula_1.svg'), + dark_src: getImageLocation('dalembert_formula_dark_1.svg'), + alt: localize('D’Alembert formula 1'), + className: 'formula', + styles: { height: '6rem' }, + }, + { + type: 'text', + content: [ + localize('Where:'), + localize('R is the number of rounds a trader can sustain given a specific loss threshold.'), + localize('B is the loss threshold.'), + localize('s is the initial stake.'), + localize('f is the unit increment.'), + ], + className: 'no-margin', + }, + { + type: 'text', + content: [ + localize( + 'For instance, if a trader has a loss threshold (B) of 100 USD, with an initial stake (s) of 1 USD and 2 units of increment (f), the calculation would be as follows:' + ), + ], + className: 'top-margin', + }, + { + type: 'media', + src: getImageLocation('dalembert_formula_2.svg'), + dark_src: getImageLocation('dalembert_formula_dark_2.svg'), + alt: localize('D’Alembert formula 2'), + className: 'formula', + styles: { height: '6rem' }, + }, + { + type: 'text', + content: [localize('Number of rounds (R) = 10')], + }, + { + type: 'text', + content: [ + localize( + 'This means after 10 rounds of consecutive losses, this trader will lose 100 USD. This reaches the loss threshold of 100 USD, stopping the bot.' + ), + ], + }, + { + type: 'text', + content: [ + localize( + 'This formula helps you plan your trades by considering the amount of money you have and your comfort level with risk. It involves determining your loss threshold and the initial stake you want to trade with. Then, you use this formula to calculate the number of rounds you can trade. This process provides insight into stake sizing and expectations.' + ), + ], + }, + { + type: 'subtitle', + content: [localize('Summary')], + }, + { + type: 'text', + content: [ + localize( + "The D'Alembert system offers more balanced trading through controlled stake progression. With prudent risk management like stake limits, it can be effectively automated in Deriv Bot. However, traders should thoroughly assess their risk appetite, test strategies on a demo account to align with their trading style before trading with real money. This allows optimising the approach and striking a balance between potential gains and losses whilst managing risk." + ), + ], + }, + { + type: 'text_italic', + content: [localize('Disclaimer:')], + }, + { + type: 'text_italic', + content: [ + localize( + 'Please be aware that while we may use rounded figures for illustration, a stake of a specific amount does not guarantee an exact amount in successful trades. For example, a 1 USD stake does not necessarily equate to a 1 USD profit in successful trades.' + ), + ], + }, + { + type: 'text_italic', + content: [ + localize( + 'Trading inherently involves risks, and actual profits can fluctuate due to various factors, including market volatility and other unforeseen variables. As such, exercise caution and conduct thorough research before engaging in any trading activities.' + ), + ], + }, +]; diff --git a/packages/bot-web-ui/src/constants/quick-strategies/accumulators_martingale_with_tick_count_take_profit.ts b/packages/bot-web-ui/src/constants/quick-strategies/accumulators_martingale_with_tick_count_take_profit.ts new file mode 100644 index 000000000000..33095c7b5d9d --- /dev/null +++ b/packages/bot-web-ui/src/constants/quick-strategies/accumulators_martingale_with_tick_count_take_profit.ts @@ -0,0 +1,198 @@ +import { getImageLocation } from '../../public-path'; +import { localize } from '@deriv/translations'; +import { TDescriptionItem } from '../../pages/bot-builder/quick-strategy/types'; + +// TODO: Added dummy description because it has dependency with tutorial sections +export const ACCUMULATORS_MARTINGALE_WITH_TICK_COUNT_TAKE_PROFIT: TDescriptionItem[] = [ + { + type: 'subtitle', + content: [localize('Exploring the Martingale strategy in Deriv Bot')], + expanded: true, + no_collapsible: false, + }, + { + type: 'text', + content: [ + localize( + "The D'Alembert strategy involves increasing your stake after a losing trade and reducing it after a successful trade by a predetermined number of units." + ), + ], + }, + { + type: 'subtitle', + content: [localize('Key parameters')], + }, + { + type: 'text', + content: [localize('These are the trade parameters used for D’Alembert strategy in Deriv Bot.')], + }, + { + type: 'text', + content: [ + localize( + 'Initial stake: The amount that you are willing to place as a stake to enter a trade. This is the starting point for any changes in stake depending on the dynamic of the strategy being used.' + ), + ], + }, + { + type: 'text', + content: [ + localize( + 'Unit: The number of units that are added in the event of a trade resulting in loss or the number of units removed in the event of a trade resulting in profit. For example, if the unit is set at 2, the stake increases or decreases by two times the initial stake of 1 USD, meaning it changes by 2 USD.' + ), + ], + }, + { + type: 'text', + content: [ + localize( + 'Profit threshold: The bot will stop trading if your total profit exceeds this amount.' + ), + ], + }, + { + type: 'text', + content: [ + localize( + 'Loss threshold: The bot will stop trading if your total loss exceeds this amount.' + ), + ], + }, + { + type: 'subtitle', + content: [localize('An example of D’Alembert strategy')], + }, + { + type: 'media', + src: getImageLocation('dalembert.svg'), + alt: localize("An example of D’Alembert's Grind strategy"), + }, + { + type: 'text', + content: [ + localize('1. Start with the initial stake. In this example, we’ll use 1 USD.'), + localize('2. Set your preferred unit. In this example, it is 2 units or 2 USD.'), + localize( + '3. If the first trade results in profit, the stake for the following trade will not reduce but remain at the initial stake. The strategy minimally trades at the initial stake of 1 USD. See A1.' + ), + localize( + '4. If the second trade results in a loss, the Deriv Bot will automatically increase your stake for the next trade by 2 USD. Deriv Bot will continue to add 2 USD to the previous round’s stake after every losing trade. See A2.' + ), + localize( + '5. If the next trades are profitable, the stake for the following trade will be reduced by 2 USD. This can be shown above where the stake of 3 USD is reduced to 1 USD. See A3.' + ), + ], + }, + { + type: 'subtitle', + content: [localize('Profit and loss thresholds')], + }, + { + type: 'text', + content: [ + localize( + "With Deriv Bot, traders can set the profit and loss thresholds to secure potential profits and limit potential losses. This means that the trading bot will automatically stop when either the profit or loss thresholds are reached. It's a form of risk management that can potentially enhance returns. For example, if a trader sets the profit threshold at 100 USD and the strategy exceeds 100 USD of profit from all trades, then the bot will stop running." + ), + ], + }, + { + type: 'subtitle', + content: [localize('Estimating the lifespan of your trades')], + }, + { + type: 'text', + content: [ + localize( + 'The D’Alembert strategy is less risky than Martingale, but you can still determine how long your funds will last with this strategy before trading. Simply use this formula.' + ), + ], + }, + { + type: 'media', + src: getImageLocation('dalembert_formula_1.svg'), + dark_src: getImageLocation('dalembert_formula_dark_1.svg'), + alt: localize('D’Alembert formula 1'), + className: 'formula', + styles: { height: '6rem' }, + }, + { + type: 'text', + content: [ + localize('Where:'), + localize('R is the number of rounds a trader can sustain given a specific loss threshold.'), + localize('B is the loss threshold.'), + localize('s is the initial stake.'), + localize('f is the unit increment.'), + ], + className: 'no-margin', + }, + { + type: 'text', + content: [ + localize( + 'For instance, if a trader has a loss threshold (B) of 100 USD, with an initial stake (s) of 1 USD and 2 units of increment (f), the calculation would be as follows:' + ), + ], + className: 'top-margin', + }, + { + type: 'media', + src: getImageLocation('dalembert_formula_2.svg'), + dark_src: getImageLocation('dalembert_formula_dark_2.svg'), + alt: localize('D’Alembert formula 2'), + className: 'formula', + styles: { height: '6rem' }, + }, + { + type: 'text', + content: [localize('Number of rounds (R) = 10')], + }, + { + type: 'text', + content: [ + localize( + 'This means after 10 rounds of consecutive losses, this trader will lose 100 USD. This reaches the loss threshold of 100 USD, stopping the bot.' + ), + ], + }, + { + type: 'text', + content: [ + localize( + 'This formula helps you plan your trades by considering the amount of money you have and your comfort level with risk. It involves determining your loss threshold and the initial stake you want to trade with. Then, you use this formula to calculate the number of rounds you can trade. This process provides insight into stake sizing and expectations.' + ), + ], + }, + { + type: 'subtitle', + content: [localize('Summary')], + }, + { + type: 'text', + content: [ + localize( + "The D'Alembert system offers more balanced trading through controlled stake progression. With prudent risk management like stake limits, it can be effectively automated in Deriv Bot. However, traders should thoroughly assess their risk appetite, test strategies on a demo account to align with their trading style before trading with real money. This allows optimising the approach and striking a balance between potential gains and losses whilst managing risk." + ), + ], + }, + { + type: 'text_italic', + content: [localize('Disclaimer:')], + }, + { + type: 'text_italic', + content: [ + localize( + 'Please be aware that while we may use rounded figures for illustration, a stake of a specific amount does not guarantee an exact amount in successful trades. For example, a 1 USD stake does not necessarily equate to a 1 USD profit in successful trades.' + ), + ], + }, + { + type: 'text_italic', + content: [ + localize( + 'Trading inherently involves risks, and actual profits can fluctuate due to various factors, including market volatility and other unforeseen variables. As such, exercise caution and conduct thorough research before engaging in any trading activities.' + ), + ], + }, +]; diff --git a/packages/bot-web-ui/src/constants/quick-strategies/index.ts b/packages/bot-web-ui/src/constants/quick-strategies/index.ts index e3605f1305dd..ac3739bf3da2 100644 --- a/packages/bot-web-ui/src/constants/quick-strategies/index.ts +++ b/packages/bot-web-ui/src/constants/quick-strategies/index.ts @@ -1,7 +1,10 @@ +export { ACCUMULATORS_DALEMBERT_ON_STAT_RESET_WITH_TICK_COUNT_TAKE_PROFIT } from './accumulators_dalembert_on_stat_reset_with_tick_count_take_profit'; +export { ACCUMULATORS_DALEMBERT_WITH_TICK_COUNT_TAKE_PROFIT } from './accumulators_dalembert_with_tick_count_take_profit'; +export { ACCUMULATORS_MARTINGALE_ON_STAT_RESET_WITH_TICK_COUNT_TAKE_PROFIT } from './accumulators_martingale_on_stat_reset_with_tick_count_take_profit'; +export { ACCUMULATORS_MARTINGALE_WITH_TICK_COUNT_TAKE_PROFIT } from './accumulators_martingale_with_tick_count_take_profit'; export { D_ALEMBERT } from './d_alembert'; export { MARTINGALE } from './martingale'; export { OSCARS_GRIND } from './oscars_grind'; export { REVERSE_D_ALEMBERT } from './reverse_dalembert'; export { REVERSE_MARTINGALE } from './reverse_martingale'; export { STRATEGY_1_3_2_6 } from './strategy_1_3_2_6'; -export { ACCUMULATORS_DALEMBERT } from './accumulators_dalembert'; diff --git a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/config.ts b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/config.ts index 3dc99848e611..9df93efb823e 100644 --- a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/config.ts +++ b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/config.ts @@ -7,7 +7,10 @@ import { REVERSE_D_ALEMBERT, REVERSE_MARTINGALE, STRATEGY_1_3_2_6, - ACCUMULATORS_DALEMBERT, + ACCUMULATORS_DALEMBERT_WITH_TICK_COUNT_TAKE_PROFIT, + ACCUMULATORS_MARTINGALE_WITH_TICK_COUNT_TAKE_PROFIT, + ACCUMULATORS_DALEMBERT_ON_STAT_RESET_WITH_TICK_COUNT_TAKE_PROFIT, + ACCUMULATORS_MARTINGALE_ON_STAT_RESET_WITH_TICK_COUNT_TAKE_PROFIT, } from '../../../constants/quick-strategies'; import { TConfigItem, TStrategies, TValidationItem } from './types'; import { LocalizeHTMLForSellConditions } from './localize_html'; @@ -68,7 +71,7 @@ const PURCHASE_TYPE: TConfigItem = { const SELL_CONDITIONS_TYPE_INFO: TConfigItem = { type: 'label', label: localize('Sell conditions'), - description: LocalizeHTMLForSellConditions(), + description: LocalizeHTMLForSellConditions, }; // This will trigger the boolean_tick_count value to render the take profit and tick count fields @@ -163,6 +166,12 @@ const LABEL_ACCUMULAORTS_UNIT: TConfigItem = { description: localize('The unit used to multiply the stake after a losing trade for the next trade.'), }; +const LABEL_ACCUMULAORTS_SIZE: TConfigItem = { + type: 'label', + label: localize('Size'), + description: localize('The size used to multiply the stake after a successful trade for the next trade.'), +}; + const LABEL_REVERSE_MARTINGALE_SIZE: TConfigItem = { type: 'label', label: localize('Size'), @@ -414,11 +423,80 @@ export const STRATEGIES: TStrategies = { [LABEL_PROFIT, PROFIT, LABEL_LOSS, LOSS], ], }, - ACCUMULATORS_DALEMBERT: { - name: 'accumulators_dalembert', - label: localize('D’Alembert'), - rs_strategy_name: `accumulators d'alembert`, - description: ACCUMULATORS_DALEMBERT, + ACCUMULATORS_MARTINGALE_WITH_TICK_COUNT_TAKE_PROFIT: { + name: 'accumulators_martingale_with_tick_count_take_profit', + label: localize('Martingale with Tick Count/Take Profit'), + rs_strategy_name: `accumulators_martingale_with_tick_count_take_profit`, + description: ACCUMULATORS_MARTINGALE_WITH_TICK_COUNT_TAKE_PROFIT, + fields: [ + [LABEL_SYMBOL, SYMBOL, LABEL_STAKE, STAKE, GROWTH_RATE, GROWTH_RATE_VALUE], + [ + LABEL_PROFIT, + PROFIT, + LABEL_LOSS, + LOSS, + LABEL_ACCUMULAORTS_SIZE, + SIZE, + SELL_CONDITIONS_TYPE_INFO, + SELL_CONDITIONS_TYPE, + TAKE_PROFIT, + TICK_COUNT, + CHECKBOX_MAX_STAKE, + MAX_STAKE, + ], + ], + }, + ACCUMULATORS_DALEMBERT_WITH_TICK_COUNT_TAKE_PROFIT: { + name: 'accumulators_dalembert_with_tick_count_take_profit', + label: localize('D’Alembert with Tick Count/Take Profit'), + rs_strategy_name: `accumulators_dalembert_with_tick_count_take_profit`, + description: ACCUMULATORS_DALEMBERT_WITH_TICK_COUNT_TAKE_PROFIT, + fields: [ + [LABEL_SYMBOL, SYMBOL, LABEL_STAKE, STAKE, GROWTH_RATE, GROWTH_RATE_VALUE], + [ + LABEL_PROFIT, + PROFIT, + LABEL_LOSS, + LOSS, + LABEL_ACCUMULAORTS_UNIT, + UNIT, + SELL_CONDITIONS_TYPE_INFO, + SELL_CONDITIONS_TYPE, + TAKE_PROFIT, + TICK_COUNT, + CHECKBOX_MAX_STAKE, + MAX_STAKE, + ], + ], + }, + ACCUMULATORS_MARTINGALE_ON_STAT_RESET_WITH_TICK_COUNT_TAKE_PROFIT: { + name: 'accumulators_martingale_on_stat_reset_with_tick_count_take_profit', + label: localize('Martingale on Stat Reset with Tick Count/Take Profit'), + rs_strategy_name: `accumulators_martingale_on_stat_reset_with_tick_count_take_profit`, + description: ACCUMULATORS_MARTINGALE_ON_STAT_RESET_WITH_TICK_COUNT_TAKE_PROFIT, + fields: [ + [LABEL_SYMBOL, SYMBOL, LABEL_STAKE, STAKE, GROWTH_RATE, GROWTH_RATE_VALUE], + [ + LABEL_PROFIT, + PROFIT, + LABEL_LOSS, + LOSS, + LABEL_ACCUMULAORTS_SIZE, + SIZE, + SELL_CONDITIONS_TYPE_INFO, + SELL_CONDITIONS_TYPE, + TAKE_PROFIT, + TICK_COUNT, + CHECKBOX_MAX_STAKE, + MAX_STAKE, + ], + ], + }, + ACCUMULATORS_DALEMBERT_ON_STAT_RESET_WITH_TICK_COUNT_TAKE_PROFIT: { + name: 'accumulators_dalembert_on_stat_reset_with_tick_count_take_profit', + label: localize("D'Alembert on Stat Reset with Tick Count/Take Profit"), + rs_strategy_name: `accumulators_dalembert_on_stat_reset_with_tick_count_take_profit`, + description: ACCUMULATORS_DALEMBERT_ON_STAT_RESET_WITH_TICK_COUNT_TAKE_PROFIT, fields: [ [LABEL_SYMBOL, SYMBOL, LABEL_STAKE, STAKE, GROWTH_RATE, GROWTH_RATE_VALUE], [ diff --git a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/form-wrappers/desktop-form-wrapper.tsx b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/form-wrappers/desktop-form-wrapper.tsx index e2a4cd4382cf..f17b600f3488 100644 --- a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/form-wrappers/desktop-form-wrapper.tsx +++ b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/form-wrappers/desktop-form-wrapper.tsx @@ -33,10 +33,9 @@ const FormWrapper: React.FC = observer(({ children, onClick const { selected_strategy, setSelectedStrategy, onSubmit, is_stop_bot_dialog_open } = quick_strategy; const { is_next_qs_enabled } = useFeatureFlags(); if (!is_next_qs_enabled) { - delete STRATEGIES.ACCUMULATORS_DALEMBERT; + delete STRATEGIES.ACCUMULATORS_DALEMBERT_WITH_TICK_COUNT_TAKE_PROFIT; } const strategy = STRATEGIES[selected_strategy as keyof typeof STRATEGIES]; - const { handleSubmit } = useQsSubmitHandler(); React.useEffect(() => { diff --git a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/form-wrappers/mobile-form-wrapper.tsx b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/form-wrappers/mobile-form-wrapper.tsx index 4ad10bf29baf..78b41e370209 100644 --- a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/form-wrappers/mobile-form-wrapper.tsx +++ b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/form-wrappers/mobile-form-wrapper.tsx @@ -33,7 +33,7 @@ const MobileFormWrapper: React.FC = observer(({ children, ac const { is_next_qs_enabled } = useFeatureFlags(); if (!is_next_qs_enabled) { - delete STRATEGIES.ACCUMULATORS_DALEMBERT; + delete STRATEGIES.ACCUMULATORS_DALEMBERT_WITH_TICK_COUNT_TAKE_PROFIT; } React.useEffect(() => { validateForm(); diff --git a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/form-wrappers/upgraded-qs-v2/trade-constants.ts b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/form-wrappers/upgraded-qs-v2/trade-constants.ts index 710ff0d0d6f3..548d863d09a8 100644 --- a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/form-wrappers/upgraded-qs-v2/trade-constants.ts +++ b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/form-wrappers/upgraded-qs-v2/trade-constants.ts @@ -65,12 +65,30 @@ export const STRATEGY_TRADE_ASSOCIATIONS: TStrategyTradeAssociations = [ name: 'STRATEGY_1_3_2_6', display_name: STRATEGIES.STRATEGY_1_3_2_6.label, id: 5, - parent: ['Options'], + parent: [localize('Options')], }, { - name: 'ACCUMULATORS_DALEMBERT', - display_name: STRATEGIES.ACCUMULATORS_DALEMBERT.label, + name: 'ACCUMULATORS_MARTINGALE_WITH_TICK_COUNT_TAKE_PROFIT', + display_name: STRATEGIES.ACCUMULATORS_MARTINGALE_WITH_TICK_COUNT_TAKE_PROFIT.label, id: 6, - parent: ['Accumulators'], + parent: [localize('Accumulators')], + }, + { + name: 'ACCUMULATORS_DALEMBERT_WITH_TICK_COUNT_TAKE_PROFIT', + display_name: STRATEGIES.ACCUMULATORS_DALEMBERT_WITH_TICK_COUNT_TAKE_PROFIT.label, + id: 7, + parent: [localize('Accumulators')], + }, + { + name: 'ACCUMULATORS_MARTINGALE_ON_STAT_RESET_WITH_TICK_COUNT_TAKE_PROFIT', + display_name: STRATEGIES.ACCUMULATORS_MARTINGALE_ON_STAT_RESET_WITH_TICK_COUNT_TAKE_PROFIT.label, + id: 8, + parent: [localize('Accumulators')], + }, + { + name: 'ACCUMULATORS_DALEMBERT_ON_STAT_RESET_WITH_TICK_COUNT_TAKE_PROFIT', + display_name: STRATEGIES.ACCUMULATORS_DALEMBERT_ON_STAT_RESET_WITH_TICK_COUNT_TAKE_PROFIT.label, + id: 9, + parent: [localize('Accumulators')], }, ]; diff --git a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/form.tsx b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/form.tsx index ded7c3db4441..618f06a6af89 100644 --- a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/form.tsx +++ b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/form.tsx @@ -23,8 +23,7 @@ const QuickStrategyForm = observer(() => { const config: TConfigItem[][] = STRATEGIES[selected_strategy]?.fields; const { is_desktop } = ui; const { values, setFieldTouched, setFieldValue } = useFormikContext(); - const { current_duration_min_max } = quick_strategy; - + const { current_duration_min_max, additional_data } = quick_strategy; const [isEnabledToggleSwitch, setIsEnabledToggleSwitch] = React.useState(values?.boolean_max_stake ?? false); React.useEffect(() => { @@ -160,7 +159,12 @@ const QuickStrategyForm = observer(() => { return null; } return ( - + ); } case 'checkbox': diff --git a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/inputs/qs-input-label.tsx b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/inputs/qs-input-label.tsx index f1f0bbb37a09..a8ad1bc52842 100644 --- a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/inputs/qs-input-label.tsx +++ b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/inputs/qs-input-label.tsx @@ -4,13 +4,14 @@ import { Popover, Text } from '@deriv/components'; type TQSInputLabel = { children?: React.ReactNode; label?: string; - description?: string | (() => React.ReactNode); + description?: string | ((additional_data?: Record) => React.ReactNode); + additional_data?: Record; }; -const QSInputLabel: React.FC = ({ label, description }) => { +const QSInputLabel: React.FC = ({ label, description, additional_data }) => { let tooltip_msg; if (typeof description === 'function') { - tooltip_msg = description(); + tooltip_msg = description(additional_data); } else { tooltip_msg = description; } diff --git a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/localize_html.tsx b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/localize_html.tsx index e4bd60f70133..17aa3c8fef91 100644 --- a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/localize_html.tsx +++ b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/localize_html.tsx @@ -1,7 +1,12 @@ -import { localize } from '@deriv/translations'; +import { Localize, localize } from '@deriv/translations'; import React from 'react'; -export const LocalizeHTMLForSellConditions = () => { +export const LocalizeHTMLForSellConditions = additional_data => { + const { max_payout, max_ticks } = additional_data ?? { + max_payout: 0, + max_ticks: 0, + }; + return (
@@ -10,12 +15,21 @@ export const LocalizeHTMLForSellConditions = () => { {localize('The position closes after the profit and loss crosses the take profit amount.')}
-
+
{localize('Tick Count: ')} {localize('Counting the number of ticks before selling the position.')}
+
+ +
); }; diff --git a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/quick-strategy.scss b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/quick-strategy.scss index 7c92d612b46c..1257499caf0a 100644 --- a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/quick-strategy.scss +++ b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/quick-strategy.scss @@ -674,7 +674,8 @@ } .sell_conditions { - &__take_profit { + &__take_profit, + &__tick_count { margin-bottom: 0.8rem; } } diff --git a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/selects/growth-rate-type.tsx b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/selects/growth-rate-type.tsx index 8be4782e4dad..49fb9b38112d 100644 --- a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/selects/growth-rate-type.tsx +++ b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/selects/growth-rate-type.tsx @@ -32,7 +32,7 @@ const GrowthRateSelect: React.FC = observer(({ name }) => { const { is_desktop } = ui; const [list, setList] = React.useState([]); const { quick_strategy, ws } = useDBotStore(); - const { setValue } = quick_strategy; + const { setValue, setAdditionalData } = quick_strategy; const { setFieldValue, values, setFieldError, errors } = useFormikContext(); const prev_proposal_payload = React.useRef(null); @@ -92,7 +92,7 @@ const GrowthRateSelect: React.FC = observer(({ name }) => { let max_error = ''; ref_max_payout.current = response?.proposal?.validation_params?.max_payout; const current_tick_count = Number(values.tick_count); - + setAdditionalData({ max_payout: ref_max_payout.current, max_ticks }); if (!isNaN(current_tick_count) && current_tick_count > max_ticks) { max_error = `Maximum tick count is: ${max_ticks}`; setFieldError('tick_count', max_error); diff --git a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/selects/symbol.tsx b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/selects/symbol.tsx index 1baff343ff2e..2175c3f9df4a 100644 --- a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/selects/symbol.tsx +++ b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/selects/symbol.tsx @@ -38,7 +38,12 @@ const SymbolSelect: React.FC = () => { const [input_value, setInputValue] = useState({ text: '', value: '' }); const [last_selected_symbol, setLastSelectedSymbol] = useState({ text: '', value: '' }); const { setFieldValue, values } = useFormikContext(); - const ACCUMULATORS_STRATEGIES = ['ACCUMULATORS_DALEMBERT']; + const ACCUMULATORS_STRATEGIES = [ + 'ACCUMULATORS_DALEMBERT_WITH_TICK_COUNT_TAKE_PROFIT', + 'ACCUMULATORS_MARTINGALE_WITH_TICK_COUNT_TAKE_PROFIT', + 'ACCUMULATORS_MARTINGALE_ON_STAT_RESET_WITH_TICK_COUNT_TAKE_PROFIT', + 'ACCUMULATORS_DALEMBERT_ON_STAT_RESET_WITH_TICK_COUNT_TAKE_PROFIT', + ]; const is_strategy_accumulator = ACCUMULATORS_STRATEGIES.includes(selected_strategy); const symbols = useMemo( diff --git a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/selects/trade-type.tsx b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/selects/trade-type.tsx index b7a4794ece66..f47cb53e23f2 100644 --- a/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/selects/trade-type.tsx +++ b/packages/bot-web-ui/src/pages/bot-builder/quick-strategy/selects/trade-type.tsx @@ -30,7 +30,12 @@ const TradeTypeSelect: React.FC = () => { const { setFieldValue, values, validateForm } = useFormikContext(); const { quick_strategy } = useDBotStore(); const { setValue, selected_strategy } = quick_strategy; - const ACCUMULATORS_STRATEGIES = ['ACCUMULATORS_DALEMBERT']; + const ACCUMULATORS_STRATEGIES = [ + 'ACCUMULATORS_DALEMBERT_WITH_TICK_COUNT_TAKE_PROFIT', + 'ACCUMULATORS_MARTINGALE_WITH_TICK_COUNT_TAKE_PROFIT', + 'ACCUMULATORS_MARTINGALE_ON_STAT_RESET_WITH_TICK_COUNT_TAKE_PROFIT', + 'ACCUMULATORS_DALEMBERT_ON_STAT_RESET_WITH_TICK_COUNT_TAKE_PROFIT', + ]; const is_strategy_accumulator = ACCUMULATORS_STRATEGIES.includes(selected_strategy); React.useEffect(() => { diff --git a/packages/bot-web-ui/src/stores/quick-strategy-store.ts b/packages/bot-web-ui/src/stores/quick-strategy-store.ts index 556cf45b57de..d88d4e1e34d0 100644 --- a/packages/bot-web-ui/src/stores/quick-strategy-store.ts +++ b/packages/bot-web-ui/src/stores/quick-strategy-store.ts @@ -21,6 +21,7 @@ export type TLossThresholdWarningData = { }; interface IQuickStrategyStore { + additional_data: Record; current_duration_min_max: { min: number; max: number; @@ -62,9 +63,11 @@ export default class QuickStrategyStore implements IQuickStrategyStore { loss_threshold_warning_data: TLossThresholdWarningData = { show: false, }; + additional_data = {}; constructor(root_store: RootStore) { makeObservable(this, { + additional_data: observable, current_duration_min_max: observable, form_data: observable, is_contract_dialog_open: observable, @@ -74,6 +77,7 @@ export default class QuickStrategyStore implements IQuickStrategyStore { selected_strategy: observable, loss_threshold_warning_data: observable, onSubmit: action, + setAdditionalData: action, setCurrentDurationMinMax: action, setFormVisibility: action, setSelectedStrategy: action, @@ -92,6 +96,13 @@ export default class QuickStrategyStore implements IQuickStrategyStore { ); } + setAdditionalData = (data: Record) => { + this.additional_data = { + ...this.additional_data, + ...data, + }; + }; + setLossThresholdWarningData = (data: TLossThresholdWarningData) => { this.loss_threshold_warning_data = { ...this.loss_threshold_warning_data, diff --git a/packages/bot-web-ui/src/xml/accumulators_dalembert_on_stat_reset_with_tick_count_take_profit.xml b/packages/bot-web-ui/src/xml/accumulators_dalembert_on_stat_reset_with_tick_count_take_profit.xml new file mode 100644 index 000000000000..a53d65476eba --- /dev/null +++ b/packages/bot-web-ui/src/xml/accumulators_dalembert_on_stat_reset_with_tick_count_take_profit.xml @@ -0,0 +1,987 @@ + + + dalembert:resultIsWin + dalembert:profit + Sell by 'Count Down'? If false, sell by 'Take Profit' + isBought + Current Tick Value + Notification:currentStake + dalembert:totalProfit + dalembert:tradeAgain + useMaxStake? + dalembert:profitThreshold + dalembert:initialStake + dalembert:totalUnits + maxStake + dalembert:lossThreshold + Tick Count + Notification:totalProfit + dalembert:changeInUnit + Notification:profitThresholdReached + Notification:lossThresholdReached + + + + + synthetic_index + random_index + 1HZ10V + + + accumulator + accumulator + + + ACCU + + + 60 + + + FALSE + + + TRUE + + + + + + + + + + + + + + + Sell by 'Count Down'? If false, sell by 'Take Profit' + + + TRUE + + + + + useMaxStake? + + + TRUE + + + + + maxStake + + + 1000 + + + + + Tick Count + + + 5 + + + + + isBought + + + FALSE + + + + + + + + + + + + + + + 0.01 + + + 1 + + + + EmObAV!^T%mj8FmH$qw4 + + + + + + + 0 + + + + + + + + + + + isBought + + + TRUE + + + + + + + AND + + + + + + EQ + + + Sell by 'Count Down'? If false, sell by 'Take Profit' + + + + + TRUE + + + + + + + + + + + GT + + + Current Tick Value + + + + + Tick Count + + + + + + + + + + + + + + + + + + + + + + + + RI6JdsHz({df~bVVIE;f + + + 4 + + + + + win + + + + + + + + + + + + + + Current Tick Value + + + 0 + + + + + isBought + + + FALSE + + + + + success + silent + + + abc + + + + + + + + LTE + + + + + + 5 + + + + + + + ACCU + + + + + + + + + + + + + + + + + isBought + + + + + Current Tick Value + + + ADD + + + 1 + + + Current Tick Value + + + + + 1 + + + + + + + + + + + + + + D'Alembert Core Functionality + Describe this function... + + + Notification:currentStake + + + + + Current stake: + + + + + + + + + + + EmObAV!^T%mj8FmH$qw4 + + + + + + + + + warn + silent + + + abc + + + Notification:currentStake + + + + + + + + dalembert:resultIsWin + + + + + dalembert:totalUnits + + + MINUS + + + 1 + + + dalembert:totalUnits + + + + + dalembert:changeInUnit + + + + + + + + + LT + + + dalembert:totalUnits + + + + + 1 + + + + + + + dalembert:totalUnits + + + 1 + + + + + + + + + + + dalembert:totalUnits + + + ADD + + + 1 + + + dalembert:totalUnits + + + + + 1 + + + dalembert:changeInUnit + + + + + + + + + GT + + + AND + + + useMaxStake? + + + + + + EmObAV!^T%mj8FmH$qw4 + + + + + + + maxStake + + + + + + + dalembert:totalUnits + + + 1 + + + + + error + silent + + + Stake resets for the next trade (reason: exceeds max stake amount) + + + + + + + + + + + + + + + + + + + D'Alembert Trade Amount + Describe this function... + + + + + EQ + + + dalembert:profitThreshold + + + + + + + + + + dalembert:profitThreshold + + + 5000 + + + + + + + + + EQ + + + dalembert:lossThreshold + + + + + + + + + + dalembert:lossThreshold + + + 3000 + + + + + + + + + EQ + + + dalembert:initialStake + + + + + + + + + + dalembert:initialStake + + + 100 + + + + + + + + + EQ + + + dalembert:changeInUnit + + + + + + + + + + dalembert:changeInUnit + + + 1 + + + + + + + + + EQ + + + dalembert:totalUnits + + + + + + + + + + dalembert:totalUnits + + + 1 + + + + + + + + + EQ + + + dalembert:totalProfit + + + + + + + + + + dalembert:totalProfit + + + 0 + + + + + + + + + + + + + + + + + + + MULTIPLY + + + 1 + + + dalembert:initialStake + + + + + 1 + + + dalembert:totalUnits + + + + + + + + + + + D'Alembert Trade Again After Purchase + Describe this function... + + + dalembert:totalProfit + + + 1 + + + dalembert:profit + + + + + dalembert:totalProfit + + + DIVIDE + + + 1 + + + ROUND + + + 3.1 + + + MULTIPLY + + + 1 + + + dalembert:totalProfit + + + + + 100 + + + + + + + + + 100 + + + + + + + + + + Z-37~d]E;0rXD;Nl]{o@ + + + dalembert:resultIsWin + + + + + Notification:totalProfit + + + + + Total Profit: + + + + + + + + + + dalembert:totalProfit + + + + + + + + + info + silent + + + abc + + + Notification:totalProfit + + + + + dalembert:tradeAgain + + + FALSE + + + + + + + + LT + + + dalembert:totalProfit + + + + + dalembert:profitThreshold + + + + + + + + + + GT + + + dalembert:totalProfit + + + + + NEG + + + 9 + + + dalembert:lossThreshold + + + + + + + + + dalembert:tradeAgain + + + TRUE + + + + + + + Notification:lossThresholdReached + + + + + Loss threshold triggered. Total Loss: + + + + + + + + + + NEG + + + 9 + + + dalembert:totalProfit + + + + + + + + + + + error + silent + + + abc + + + Notification:lossThresholdReached + + + + + + + abc + + + Notification:lossThresholdReached + + + + + + + + + + + + + Notification:profitThresholdReached + + + + + Profit threshold triggered. Total Profit: + + + + + + + + + + dalembert:totalProfit + + + + + + + + + success + silent + + + abc + + + Notification:profitThresholdReached + + + + + + + abc + + + Notification:profitThresholdReached + + + + + + + + + + + + + + + + + + + + + + + + + dalembert:tradeAgain + + + + \ No newline at end of file diff --git a/packages/bot-web-ui/src/xml/accumulators_dalembert.xml b/packages/bot-web-ui/src/xml/accumulators_dalembert_with_tick_count_take_profit.xml similarity index 100% rename from packages/bot-web-ui/src/xml/accumulators_dalembert.xml rename to packages/bot-web-ui/src/xml/accumulators_dalembert_with_tick_count_take_profit.xml diff --git a/packages/bot-web-ui/src/xml/accumulators_martingale_on_stat_reset_with_tick_count_take_profit.xml b/packages/bot-web-ui/src/xml/accumulators_martingale_on_stat_reset_with_tick_count_take_profit.xml new file mode 100644 index 000000000000..711a432426a0 --- /dev/null +++ b/packages/bot-web-ui/src/xml/accumulators_martingale_on_stat_reset_with_tick_count_take_profit.xml @@ -0,0 +1,945 @@ + + + martingale:resultIsWin + martingale:profit + Sell by 'Count Down'? If false, sell by 'Take Profit' + isBought + Current Tick Value + Notification:currentStake + martingale:totalProfit + martingale:tradeAgain + setMaxStake? + martingale:profitThreshold + martingale:multiplier + martingale:initialStake + maxStake + martingale:lossThreshold + Tick Count + Notification:totalProfit + martingale:size + Notification:profitThresholdReached + Notification:lossThresholdReached + + + + + synthetic_index + random_index + 1HZ10V + + + accumulator + accumulator + + + ACCU + + + 60 + + + FALSE + + + TRUE + + + + + + + + + + + + + + + Sell by 'Count Down'? If false, sell by 'Take Profit' + + + TRUE + + + + + setMaxStake? + + + TRUE + + + + + maxStake + + + 1000 + + + + + Tick Count + + + 5 + + + + + isBought + + + FALSE + + + + + + + + + + + + + + + 0.01 + + + 1 + + + + x3TA)`V~gtD7?rqNj[.9 + + + + + + + 0 + + + + + + + + + + + isBought + + + TRUE + + + + + + + AND + + + + + + EQ + + + Sell by 'Count Down'? If false, sell by 'Take Profit' + + + + + TRUE + + + + + + + + + + + GT + + + Current Tick Value + + + + + Tick Count + + + + + + + + + + + + + + + + + + + + + + + + N,_%hZ47`]!eOyc7%u8] + + + 4 + + + + + win + + + + + + + + + + + + + + Current Tick Value + + + 0 + + + + + isBought + + + FALSE + + + + + success + silent + + + abc + + + + + + + + LTE + + + + + + 5 + + + + + + + ACCU + + + + + + + + + + + + + + + + + isBought + + + + + Current Tick Value + + + ADD + + + 1 + + + Current Tick Value + + + + + 1 + + + + + + + + + + + + + + Martingale Core Functionality + Describe this function... + + + Notification:currentStake + + + + + Current stake: + + + + + + + + + + + x3TA)`V~gtD7?rqNj[.9 + + + + + + + + + warn + silent + + + abc + + + Notification:currentStake + + + + + + + + martingale:resultIsWin + + + + + martingale:multiplier + + + 1 + + + + + + + martingale:multiplier + + + MULTIPLY + + + 1 + + + martingale:multiplier + + + + + 2 + + + martingale:size + + + + + + + + + AND + + + setMaxStake? + + + + + GT + + + + x3TA)`V~gtD7?rqNj[.9 + + + + + maxStake + + + + + + + + + martingale:multiplier + + + 1 + + + + + error + silent + + + Stake resets for the next trade (reason: exceeds max stake amount) + + + + + + + + + + + + + + + + + + + Martingale Trade Amount + Describe this function... + + + + + EQ + + + martingale:profitThreshold + + + + + + + + + + martingale:profitThreshold + + + 5000 + + + + + + + + + EQ + + + martingale:lossThreshold + + + + + + + + + + martingale:lossThreshold + + + 3000 + + + + + + + + + EQ + + + martingale:initialStake + + + + + + + + + + martingale:initialStake + + + 100 + + + + + + + + + EQ + + + martingale:size + + + + + + + + + + martingale:size + + + 3 + + + + + + + + + EQ + + + martingale:multiplier + + + + + + + + + + martingale:multiplier + + + 1 + + + + + + + + + EQ + + + martingale:totalProfit + + + + + + + + + + martingale:totalProfit + + + 0 + + + + + + + + + + + + + + + + + + + MULTIPLY + + + 1 + + + martingale:multiplier + + + + + 1 + + + martingale:initialStake + + + + + + + + + + + Martingale Trade Again After Purchase + Describe this function... + + + martingale:totalProfit + + + 1 + + + martingale:profit + + + + + martingale:totalProfit + + + DIVIDE + + + 1 + + + ROUND + + + 3.1 + + + MULTIPLY + + + 1 + + + martingale:totalProfit + + + + + 100 + + + + + + + + + 100 + + + + + + + + + + s`u(+vlS44fI;pul:nfW + + + martingale:resultIsWin + + + + + Notification:totalProfit + + + + + Total Profit: + + + + + + + + + + martingale:totalProfit + + + + + + + + + info + silent + + + abc + + + Notification:totalProfit + + + + + martingale:tradeAgain + + + FALSE + + + + + + + + LT + + + martingale:totalProfit + + + + + martingale:profitThreshold + + + + + + + + + + GT + + + martingale:totalProfit + + + + + NEG + + + 9 + + + martingale:lossThreshold + + + + + + + + + martingale:tradeAgain + + + TRUE + + + + + + + Notification:lossThresholdReached + + + + + Loss threshold triggered. Total Loss: + + + + + + + + + + NEG + + + 9 + + + martingale:totalProfit + + + + + + + + + + + error + silent + + + abc + + + Notification:lossThresholdReached + + + + + + + abc + + + Notification:lossThresholdReached + + + + + + + + + + + + + Notification:profitThresholdReached + + + + + Profit threshold triggered. Total Profit: + + + + + + + + + + martingale:totalProfit + + + + + + + + + success + silent + + + abc + + + Notification:profitThresholdReached + + + + + + + abc + + + Notification:profitThresholdReached + + + + + + + + + + + + + + + + + + + + + + + + + martingale:tradeAgain + + + + \ No newline at end of file diff --git a/packages/bot-web-ui/src/xml/accumulators_martingale_with_tick_count_take_profit.xml b/packages/bot-web-ui/src/xml/accumulators_martingale_with_tick_count_take_profit.xml new file mode 100644 index 000000000000..3a472a3064d7 --- /dev/null +++ b/packages/bot-web-ui/src/xml/accumulators_martingale_with_tick_count_take_profit.xml @@ -0,0 +1,928 @@ + + + martingale:resultIsWin + martingale:profit + Sell by 'Count Down'? If false, sell by 'Take Profit' + isBought + Current Tick Value + Notification:currentStake + martingale:totalProfit + martingale:tradeAgain + setMaxStake? + martingale:profitThreshold + martingale:multiplier + martingale:initialStake + maxStake + martingale:lossThreshold + Tick Count + Notification:totalProfit + martingale:size + Notification:profitThresholdReached + Notification:lossThresholdReached + + + + + synthetic_index + random_index + 1HZ10V + + + accumulator + accumulator + + + ACCU + + + 60 + + + FALSE + + + TRUE + + + + + + + + + + + + + + + Sell by 'Count Down'? If false, sell by 'Take Profit' + + + TRUE + + + + + setMaxStake? + + + TRUE + + + + + maxStake + + + 1000 + + + + + Tick Count + + + 5 + + + + + isBought + + + FALSE + + + + + + + + + + + + + + + 0.01 + + + 1 + + + + x3TA)`V~gtD7?rqNj[.9 + + + + + + + 0 + + + + + + + + + + + isBought + + + TRUE + + + + + + + AND + + + + + + EQ + + + Sell by 'Count Down'? If false, sell by 'Take Profit' + + + + + TRUE + + + + + + + + + + + GT + + + Current Tick Value + + + + + Tick Count + + + + + + + + + + + + + + + + + + + + + + + + N,_%hZ47`]!eOyc7%u8] + + + 4 + + + + + win + + + + + + + + + + + + + + Current Tick Value + + + 0 + + + + + isBought + + + FALSE + + + + + success + silent + + + abc + + + + + + ACCU + + + + + + + + + + + + + + + isBought + + + + + Current Tick Value + + + ADD + + + 1 + + + Current Tick Value + + + + + 1 + + + + + + + + + + + + + + Martingale Core Functionality + Describe this function... + + + Notification:currentStake + + + + + Current stake: + + + + + + + + + + + x3TA)`V~gtD7?rqNj[.9 + + + + + + + + + warn + silent + + + abc + + + Notification:currentStake + + + + + + + + martingale:resultIsWin + + + + + martingale:multiplier + + + 1 + + + + + + + martingale:multiplier + + + MULTIPLY + + + 1 + + + martingale:multiplier + + + + + 2 + + + martingale:size + + + + + + + + + AND + + + setMaxStake? + + + + + GT + + + + x3TA)`V~gtD7?rqNj[.9 + + + + + maxStake + + + + + + + + + martingale:multiplier + + + 1 + + + + + error + silent + + + Stake resets for the next trade (reason: exceeds max stake amount) + + + + + + + + + + + + + + + + + + + Martingale Trade Amount + Describe this function... + + + + + EQ + + + martingale:profitThreshold + + + + + + + + + + martingale:profitThreshold + + + 5000 + + + + + + + + + EQ + + + martingale:lossThreshold + + + + + + + + + + martingale:lossThreshold + + + 3000 + + + + + + + + + EQ + + + martingale:initialStake + + + + + + + + + + martingale:initialStake + + + 100 + + + + + + + + + EQ + + + martingale:size + + + + + + + + + + martingale:size + + + 3 + + + + + + + + + EQ + + + martingale:multiplier + + + + + + + + + + martingale:multiplier + + + 1 + + + + + + + + + EQ + + + martingale:totalProfit + + + + + + + + + + martingale:totalProfit + + + 0 + + + + + + + + + + + + + + + + + + + MULTIPLY + + + 1 + + + martingale:multiplier + + + + + 1 + + + martingale:initialStake + + + + + + + + + + + Martingale Trade Again After Purchase + Describe this function... + + + martingale:totalProfit + + + 1 + + + martingale:profit + + + + + martingale:totalProfit + + + DIVIDE + + + 1 + + + ROUND + + + 3.1 + + + MULTIPLY + + + 1 + + + martingale:totalProfit + + + + + 100 + + + + + + + + + 100 + + + + + + + + + + s`u(+vlS44fI;pul:nfW + + + martingale:resultIsWin + + + + + Notification:totalProfit + + + + + Total Profit: + + + + + + + + + + martingale:totalProfit + + + + + + + + + info + silent + + + abc + + + Notification:totalProfit + + + + + martingale:tradeAgain + + + FALSE + + + + + + + + LT + + + martingale:totalProfit + + + + + martingale:profitThreshold + + + + + + + + + + GT + + + martingale:totalProfit + + + + + NEG + + + 9 + + + martingale:lossThreshold + + + + + + + + + martingale:tradeAgain + + + TRUE + + + + + + + Notification:lossThresholdReached + + + + + Loss threshold triggered. Total Loss: + + + + + + + + + + NEG + + + 9 + + + martingale:totalProfit + + + + + + + + + + + error + silent + + + abc + + + Notification:lossThresholdReached + + + + + + + abc + + + Notification:lossThresholdReached + + + + + + + + + + + + + Notification:profitThresholdReached + + + + + Profit threshold triggered. Total Profit: + + + + + + + + + + martingale:totalProfit + + + + + + + + + success + silent + + + abc + + + Notification:profitThresholdReached + + + + + + + abc + + + Notification:profitThresholdReached + + + + + + + + + + + + + + + + + + + + + + + + + martingale:tradeAgain + + + + \ No newline at end of file