<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forex Software — Take Profit Out of Range]]></title>
	<link rel="self" href="https://forexsb.com/forum/feed/atom/topic/9822/" />
	<updated>2024-11-11T09:46:04Z</updated>
	<generator>PunBB</generator>
	<id>https://forexsb.com/forum/topic/9822/take-profit-out-of-range/</id>
		<entry>
			<title type="html"><![CDATA[Re: Take Profit Out of Range]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/81798/#p81798" />
			<content type="html"><![CDATA[<p>The bug is confirmed.</p><p>I&#039;ll fix it ASAP.</p><p>Thank you for the report!</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2024-11-11T09:46:04Z</updated>
			<id>https://forexsb.com/forum/post/81798/#p81798</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Take Profit Out of Range]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/81046/#p81046" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>Strategy 1
----------------------------------------------
Stop Loss 500, Take Profit 25
Entry: MACD Signal [0,3] [38,96,16] Moving Average of Oscillator [3,3] [4,89,17,-0.0014]
Exit : Do not Exit [0] []


    10023 ┤                     ╭─────────────────     Net profit      23.40 USD
    10021 ┤                     │                      Profit per day  0.01  USD
    10019 ┤                     │                      Profit factor   23.40
    10017 ┤                     │                      Max drawdown    0.00  USD
    10015 ┤                     │                      Max drawdown    0.00  %
    10013 ┤                     │                      Return/drawdown 23.40
    10010 ┤                    ╭╯                      Win / loss      1.00
    10008 ┤                    │                       Max stagnation  1897  days
    10006 ┤                    │                       Max stagnation  53.85 %
    10004 ┤                    │                       R - squared     54.92
    10002 ┤                    │                       Max cons losses 0
    10000 ┼────────────────────╯                       Count of trades 1


Strategy 2
----------------------------------------------
Stop Loss 500, Take Profit 25
Entry: Average True Range [5] [44,0.0051] Awesome Oscillator [0] [0] MACD [3,3] [47,97,9]
Exit : Do not Exit [0] []


    10021 ┤      ╭────────────────────────────────     Net profit      21.29 USD
    10019 ┤     ╭╯                                     Profit per day  0.01  USD
    10017 ┤     │                                      Profit factor   21.29
    10015 ┤     │                                      Max drawdown    0.00  USD
    10013 ┤     │                                      Max drawdown    0.00  %
    10011 ┤     │                                      Return/drawdown 21.29
    10010 ┤     │                                      Win / loss      1.00
    10008 ┤     │                                      Max stagnation  2986  days
    10006 ┤     │                                      Max stagnation  84.76 %
    10004 ┤     │                                      R - squared     8.96
    10002 ┤     │                                      Max cons losses 0
    10000 ┼─────╯                                      Count of trades 1


Strategy 3
----------------------------------------------
Stop Loss 500, Take Profit 25
Entry: Momentum [6,3] [23,100]
Exit : Do not Exit [0] []


    16869 ┤                                  ╭────     Net profit      6589.90 USD
    16245 ┤                             ╭──╮╭╯         Profit per day  1.87    USD
    15620 ┤                         ╭───╯  ╰╯          Profit factor   1.68
    14996 ┤                     ╭╮╭─╯                  Max drawdown    1174.98 USD
    14371 ┤       ╭─╮╭──────╮ ╭─╯╰╯                    Max drawdown    8.07    %
    13747 ┤     ╭─╯ ╰╯      ╰─╯                        Return/drawdown 5.61
    13122 ┤    ╭╯                                      Win / loss      0.94
    12498 ┤   ╭╯                                       Max stagnation  699     days
    11873 ┤   │                                        Max stagnation  19.82   %
    11249 ┤ ╭─╯                                        R - squared     63.39
    10624 ┤ │                                          Max cons losses 2
    10000 ┼─╯                                          Count of trades 695


Strategy 4
----------------------------------------------
Stop Loss 500, Take Profit 25
Entry: Pin Bar [0] [9,39]
Exit : Do not Exit [0] []</code></pre></div><p>NOW WHEN I GENERATE A STRATEGY IT RESPECTS THE MAXIMUM AND MINIMUM RANGE CONFIRMS TO ME IF THIS IS CORRECT</p>]]></content>
			<author>
				<name><![CDATA[gabdecsters]]></name>
				<uri>https://forexsb.com/forum/user/14801/</uri>
			</author>
			<updated>2024-08-30T22:53:45Z</updated>
			<id>https://forexsb.com/forum/post/81046/#p81046</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Take Profit Out of Range]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/81045/#p81045" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>i.changeTakeProfit=function(t,e){var a;0!==e.takeProfitUsage&amp;&amp;Math.random()&lt;.5?(t.useTakeProfit=!1,t.takeProfit=Math.max(Math.min(100,e.takeProfitRangeMax),e.takeProfitRangeMin)):(t.useTakeProfit=!0,a=e.takeProfitGteStopLoss&amp;&amp;t.useStopLoss?Math.max(e.takeProfitRangeMin,Math.min(t.stopLoss,e.takeProfitRangeMax)):e.takeProfitRangeMin,e=Math.min(e.takeProfitRangeMax,Math.max(e.stopLossRangeMax,a)),t.takeProfit=Num.randomInteger(a,e))}</code></pre></div><p>sir, if you allow me to help you, I managed to solve the problem as follows, but I am sure that you will do better, because I believe I have made a palliative measure </p><p>Here is the line I put inside the xgen.min.js file to solve my problem </p><p>When useTakeProfit is set to false, the takeProfit value is limited to the maximum takeProfitRangeMax:</p><p>When useTakeProfit is true, we ensure that the maximum value of e (which will be used to generate the random takeProfit) does not exceed takeProfitRangeMax:</p><p>These changes ensure that the Take Profit amount will never exceed the take_profit_range_max set in the settings.</p>]]></content>
			<author>
				<name><![CDATA[gabdecsters]]></name>
				<uri>https://forexsb.com/forum/user/14801/</uri>
			</author>
			<updated>2024-08-30T22:52:08Z</updated>
			<id>https://forexsb.com/forum/post/81045/#p81045</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Take Profit Out of Range]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/81044/#p81044" />
			<content type="html"><![CDATA[<p>yes sr</p><div class="codebox"><pre><code>; Settings keys can be in snake case, camel case, or pascal case.
; All settings can be overwritten by an user settings file or a command option.
; Example: node ./bin/gen.js --settings ./my-settings.ini --collection-capacity 1000

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Data source              ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Express Generator loads data by either &quot;server&quot;, &quot;symbol&quot;, and &quot;period&quot; or by &quot;data_file&quot;

; Server is actually the data files folder under the &quot;data&quot; folder.
; Provided by Forex Software Ltd.: Premium, Eightcap, BlackBull, Darwinex, MetaQuotes
server = Premium
symbol = EURUSD
; Avalable values: M1, M5, M15, M30, H1, H4, D1
period = M30

; Data file from Premium data or exported from Meta Trader
; Example: data_file = ./data/Premium/EURUSD_M30.json
; The usage of &quot;data_file&quot; overrides the &quot;symbol&quot; and the &quot;period&quot; parameters.
data_file =

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Output collection        ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Collection&#039;s filename for a newly generated or a validated Collection.
; Possible placeholders: [SERVER], [SYMBOL], [PERIOD], [YEAR], [MONTH], [DAY], [COUNT], [PROFIT]
; Placeholders can be used as directory names too.
; Example: output = ./collections/[SERVER]/[SYMBOL]/[PERIOD]/collection.json
output = ./collections/Coll_[SYMBOL]_[PERIOD].json

; When &#039;false&#039; it adds a suffix to the collection file if it already exists.
; When &#039;true&#039;, it overwrites the file.
output_replace = false

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Input collection or directory  ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Points one or several collections or a collection directory for validation.
; Keep empty to generate a new Collection.
; Possible placeholders: [SERVER], [SYMBOL], [PERIOD], [YEAR], [MONTH], [DAY]
input =

; Filters the input collections by given text phrases.
; It is helpful when we have an &quot;input&quot; directory with many collections.
; Possible placeholders: [SERVER], [SYMBOL], [PERIOD], [YEAR], [MONTH], [DAY]
input_match =./collections

; It validates the &quot;input&quot; strategies and then continues generating new ones
validate_then_generate = false

; Prevent rising an error when an input file cannot be loaded
suppress_input_error = false

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Collection               ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; The Collection will purge the excessive records.
; 0 means 100000
collection_capacity = 1000

; Sort the Collection by one of the following metrics:
; NetBalance, Profit, ProfitFactor, ReturnToDrawdown, RSquared, Stagnation, WinLossRatio
sort_by = Profit

; Correlation analysis threshold
correlation_threshold = 0.98

; Detect balance lines correlation
resolve_correlation = true

; Detect strategies with similar trading rules
resolve_similar_rules = false

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Generator stop           ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; 0 means unlimited for all of the options
max_calculated_strategies = 0
max_ascended_strategies   = 0
max_collected_strategies  = 0
max_working_minutes       = 0

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Acceptance criteria      ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Set 0 to ignore a criterion (except for min_profit)
max_consecutive_losses = 0
max_drawdown_percent   = 0
max_equity_drawdown    = 0
max_stagnation_days    = 0
max_stagnation_percent = 0
min_count_of_trades    = 10
min_profit             = 1
min_profit_factor      = 0
min_profit_per_day     = 0
min_r_squared          = 0
min_return_to_drawdown = 0
min_win_loss_ratio     = 0
min_m1_count_of_trades = 0
min_m1_profit          = 0
min_m1_profit_factor   = 0
min_y1_count_of_trades = 0
min_y1_profit          = 0
min_y1_profit_factor   = 0

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Account settings         ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

account_currency      = USD
initial_account       = 10000
leverage              = 100

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Strategy properties      ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

entry_lots            = 0.10

; Trade direction: LongAndShort, LongOnly
trade_direction_mode  = LongAndShort

; Opposite entry signal: Ignore, Reverse, IgnoreOrReverse
opposite_entry_signal = Ignore

; Stop Loss: AlwaysUse, MayUse, DoNotUse
stop_loss_usage       = AlwaysUse
; Stop Loss type: Fixed, Trailing, FixedOrTrailing
stop_loss_type        = Fixed
stop_loss_range_min   = 500
stop_loss_range_max   = 500

; Take Profit: AlwaysUse, MayUse, DoNotUse
take_profit_usage         = AlwaysUse
take_profit_range_min     = 25
take_profit_range_max     = 25
take_profit_gte_stop_loss = false

; Max number of indicators to use
max_entry_slots = 8
max_exit_slots  = 1

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Backtester               ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Values: Open, Close. Use Open for EA Studio and Close for FSB Pro
exit_trade_at         = Open
close_at_backtest_end = true

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Data Horizon             ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

max_data_bars  = 100000

; Use these parameters to set the data range between &quot;data_start&quot; and &quot;data_end&quot;.
; Set from where the actual trading starts with &quot;trade_start&quot;.
; Text: &quot;2023-05-25 00:00 UTC&quot;, &quot;2023-05-25 00:00&quot;, &quot;2023-05-25&quot; or &quot;25 May 2023 00:00 UTC&quot;
; Negative number as a number of days before the current date: -365, -30, -7

use_data_start  = false
data_start      = &quot;01 Jan 2020 00:00 UTC&quot;

use_data_end    = false
data_end        = &quot;30 Jun 2023 00:00 UTC&quot;

use_trade_start = false
trade_start     = &quot;01 Jun 2023 00:00 UTC&quot;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Forward testing          ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Validate strategies on new unseen data.

use_forward_testing = false
preload_data_bars   = 0

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Out of sample            ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Use these parameters to set the data range.
; The program cuts data after applying Data Horizon.

data_start_percent = 0
data_end_percent   = 100

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Trading Session          ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

session_open  = 00:00
session_close = 24:00
friday_close  = 24:00

trade_on_sunday = true

close_at_session_close = false
close_at_friday_close  = false

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Symbol info              ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Set values to override the values coming with the data file.
; Useful for the Premium Data.
; Commission is in Currency applied at Close.

spread     =
swap_long  =
swap_short =
commission =

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Miscellaneous            ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; When enabled, the generator dynamically updates the best strategy on the console.
update_best = true

; How many strategies to print when finish
show_top = 10

; Prevent showing output in the console (except errors)
silent = false

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Indicators used by the Generator ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; Entry indicators

entry_accelerator_oscillator       = true
entry_accumulation_distribution    = false
entry_adx                          = true
entry_alligator                    = true
entry_average_true_range           = true
entry_awesome_oscillator           = true
entry_bears_power                  = true
entry_bollinger_bands              = true
entry_bulls_power                  = true
entry_candle_color                 = true
entry_commodity_channel_index      = true
entry_demarker                     = true
entry_directional_indicators       = true
entry_donchian_channel             = false
entry_envelopes                    = true
entry_force_index                  = false
entry_long_or_short                = false
entry_macd                         = true
entry_macd_signal                  = true
entry_momentum                     = true
entry_money_flow_index             = false
entry_moving_average               = true
entry_moving_average_of_oscillator = true
entry_moving_averages_crossover    = true
entry_on_balance_volume            = false
entry_pin_bar                      = true
entry_rsi                          = true
entry_rvi                          = false
entry_rvi_signal                   = false
entry_standard_deviation           = true
entry_stochastic                   = true
entry_stochastic_signal            = true
entry_time                         = false
entry_volumes                      = false
entry_williams_percent_range       = true

;; Exit indicators

exit_accelerator_oscillator       = false
exit_accumulation_distribution    = false
exit_adx                          = false
exit_alligator                    = false
exit_average_true_range           = false
exit_awesome_oscillator           = false
exit_bears_power                  = false
exit_bollinger_bands              = false
exit_bulls_power                  = false
exit_candle_color                 = false
exit_commodity_channel_index      = false
exit_demarker                     = false
exit_directional_indicators       = false
exit_do_not_exit                  = true
exit_donchian_channel             = false
exit_envelopes                    = false
exit_force_index                  = false
exit_macd                         = false
exit_macd_signal                  = false
exit_momentum                     = false
exit_money_flow_index             = false
exit_moving_average               = false
exit_moving_average_of_oscillator = false
exit_moving_averages_crossover    = false
exit_on_balance_volume            = false
exit_rsi                          = false
exit_rvi                          = false
exit_rvi_signal                   = false
exit_standard_deviation           = false
exit_stochastic                   = false
exit_stochastic_signal            = false
exit_time                         = false
exit_volumes                      = false
exit_williams_percent_range       = false

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Indicator options                ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; The following options are used by the Generator for composing new strategies.

; Randomize Moving Average Methods.
; When &#039;true&#039;, the Generator chooses between Simple, Exponential, Weighted and Smoothed.
randomize_ma_method = false

; Maximum period generated by the Generator. Recommended: 50. Recommended max 200.
max_indicator_period = 100

; Shift of the Moving Average indicator. When it is enabled, the Generator may use shift.
randomize_ma_shift = false

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Auto-save collection             ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Auto-save is useful if you run Express Generator for long time on strict Acceptance Criteria
; Setting 0 disables an option. Choose one of the options only.

; Save the collection at a particular interval in minutes.
; It doesn&#039;t clear EG collection.
auto_save_at_minutes = 0

; Save the collection when it reaches the given count.
; It clears EG collection.
auto_save_at_collected = 0

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Optimizer                        ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

enable_optimizer     = false
numeric_values_steps = 20
optimize_protections = false

; Search best strategy by:
; NetBalance, Profit, ProfitFactor, ReturnToDrawdown, RSquared, Stagnation, WinLossRatio
optimize_by = Profit

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Monte Carlo                      ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

enable_monte_carlo            = false
count_of_tests                =  20
valid_tests_percent           =  80

spread_max                    =  30

; Execution problems
slippage_max                  =  20
skip_entries_percent          =   2
skip_exits_percent            =   2
rand_close_percent            =   0

; Strategy variations
ind_params_change_probability =   0
ind_params_max_change_percent =  20
ind_params_min_delta_steps    =  20
rand_first_bar_percent        =  10

; Monte Carlo validation
mc_max_consecutive_losses     =   0
mc_max_drawdown_percent       =   0
mc_max_equity_drawdown        =   0
mc_max_stagnation_days        =   0
mc_max_stagnation_percent     =   0
mc_min_count_of_trades        = 100
mc_min_profit                 =  10
mc_min_profit_factor          =   0
mc_min_profit_per_day         =   0
mc_min_r_squared              =   0
mc_min_return_to_drawdown     =   0
mc_min_win_loss_ratio         =   0</code></pre></div>]]></content>
			<author>
				<name><![CDATA[gabdecsters]]></name>
				<uri>https://forexsb.com/forum/user/14801/</uri>
			</author>
			<updated>2024-08-30T21:41:46Z</updated>
			<id>https://forexsb.com/forum/post/81044/#p81044</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Take Profit Out of Range]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/81040/#p81040" />
			<content type="html"><![CDATA[<p>Thank you for the report!</p><p>It looks like a bug.</p><p>I check the code and cannot see obvious problems, so I need to dig deeper.</p><p>Please give me more details about this case. <br />Did it happen when generating new strategies or when validating old collections?<br />Did you use Optimizer or Monte Carlo?</p><p>Please post the complete command and the ini file to make reproducing and fixing the issue easier.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2024-08-30T14:15:14Z</updated>
			<id>https://forexsb.com/forum/post/81040/#p81040</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Take Profit Out of Range]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/81025/#p81025" />
			<content type="html"><![CDATA[<p>Hello good night I would like to draw attention to a bug that is happening to me this occurred right after the update that happened in the afternoon all the robots even being with the limiter in this way</p><div class="codebox"><pre><code>stop_loss_type = Fixed
stop_loss_range_min = 1000
stop_loss_range_max = 1000

; Take Profit: AlwaysUse, MayUse, DoNotUse
take_profit_usage = AlwaysUse
take_profit_range_min = 25
take_profit_range_max = 25
take_profit_gte_stop_loss = false</code></pre></div><p>It simply all the strategy that generates does not obey minimum and maximum arrangement in case it was for all strategies</p><p>----------------------------------------------<br />Stop Loss 1000, Take Profit 96, Long only<br />Entry: RSI [7.3] [5.50] Alligator [3,3,4] [47,21,21,5,5,1] ADX [2] [2.31] Bulls Power [3] [6.0]<br />Exit : Do not Exit [0] []</p><br /><p>I believe it could be a bug</p>]]></content>
			<author>
				<name><![CDATA[gabdecsters]]></name>
				<uri>https://forexsb.com/forum/user/14801/</uri>
			</author>
			<updated>2024-08-29T02:00:15Z</updated>
			<id>https://forexsb.com/forum/post/81025/#p81025</id>
		</entry>
</feed>
