Create a dapp to make the the setting file easier to edit. Maybe for example we can set all the settings in eastudio export them and use in EG.
When it is not compatible maybe it will be great to have a website dapp or seomthing to change the settings in a GUI and export them. That will be great
Maybe someone can use it or maybe popov can improve it and put in on webserver :-)
<!DOCTYPE html>
<html>
<head>
<title>INI Settings Editor</title>
<style>
body {
font-family: Arial, sans-serif;
}
.section {
border: 1px solid #ccc;
padding: 10px;
margin-bottom: 10px;
}
label {
display: inline-block;
width: 200px;
}
input[type="text"],
input[type="number"],
select {
width: 300px;
}
button {
margin-top: 10px;
padding: 8px 16px;
background-color: #007BFF;
color: #fff;
border: none;
cursor: pointer;
}
</style>
</head>
<body>
<h1>INI Settings Editor</h1>
<div class="section">
<h2>Data Source</h2>
<label>Server:</label>
<input type="text" id="server">
<br>
<label>Symbol:</label>
<input type="text" id="symbol">
<br>
<label>Period:</label>
<input type="text" id="period">
<br>
<label>Data File:</label>
<input type="text" id="dataFile">
</div>
<div class="section">
<h2>Input and Output</h2>
<label>Input:</label>
<input type="text" id="input">
<br>
<label>Output:</label>
<input type="text" id="output">
<br>
<label>Output Replace:</label>
<select id="outputReplace">
<option value="false">False</option>
<option value="true">True</option>
</select>
<br>
<label>Validate Then Generate:</label>
<select id="validateThenGenerate">
<option value="false">False</option>
<option value="true">True</option>
</select>
</div>
<div class="section">
<h2>Collection</h2>
<label>Collection Capacity:</label>
<input type="number" id="collectionCapacity">
<br>
<label>Sort By:</label>
<select id="sortBy">
<option value="NetBalance">NetBalance</option>
<option value="Profit">Profit</option>
<option value="ProfitFactor">ProfitFactor</option>
<option value="ReturnToDrawdown">ReturnToDrawdown</option>
<option value="RSquared">RSquared</option>
<option value="Stagnation">Stagnation</option>
<option value="WinLossRatio">WinLossRatio</option>
</select>
<br>
<label>Correlation Threshold:</label>
<input type="number" step="0.01" id="correlationThreshold">
<br>
<label>Resolve Correlation:</label>
<select id="resolveCorrelation">
<option value="false">False</option>
<option value="true">True</option>
</select>
<br>
<label>Resolve Similar Rules:</label>
<select id="resolveSimilarRules">
<option value="false">False</option>
<option value="true">True</option>
</select>
</div>
<div class="section">
<h2>Generator Stop</h2>
<label>Max Ascended Strategies:</label>
<input type="number" id="maxAscendedStrategies">
<br>
<label>Max Calculated Strategies:</label>
<input type="number" id="maxCalculatedStrategies">
<br>
<label>Max Working Minutes:</label>
<input type="number" id="maxWorkingMinutes">
</div>
<div class="section">
<h2>Acceptance Criteria</h2>
<label>Max Consecutive Losses:</label>
<input type="number" id="maxConsecutiveLosses">
<br>
<label>Max Drawdown Percent:</label>
<input type="number" step="0.01" id="maxDrawdownPercent">
<br>
<label>Max Equity Drawdown:</label>
<input type="number" step="0.01" id="maxEquityDrawdown">
<br>
<label>Max Stagnation Days:</label>
<input type="number" id="maxStagnationDays">
<br>
<label>Max Stagnation Percent:</label>
<input type="number" step="0.01" id="maxStagnationPercent">
<br>
<label>Min Count of Trades:</label>
<input type="number" id="minCountOfTrades">
<br>
<label>Min Profit:</label>
<input type="number" id="minProfit">
<br>
<label>Min Profit Factor:</label>
<input type="number" step="0.01" id="minProfitFactor">
<br>
<label>Min Profit Per Day:</label>
<input type="number" step="0.01" id="minProfitPerDay">
<br>
<label>Min R-Squared:</label>
<input type="number" step="0.01" id="minRSquared">
<br>
<label>Min Return to Drawdown:</label>
<input type="number" step="0.01" id="minReturnToDrawdown">
<br>
<label>Min Win Loss Ratio:</label>
<input type="number" id="minWinLossRatio">
</div>
<div class="section">
<h2>Account Settings</h2>
<label>Account Currency:</label>
<input type="text" id="accountCurrency">
<br>
<label>Initial Account:</label>
<input type="number" id="initialAccount">
<br>
<label>Leverage:</label>
<input type="number" id="leverage">
</div>
<div class="section">
<h2>Strategy Properties</h2>
<label>Entry Lots:</label>
<input type="number" step="0.01" id="entryLots">
<br>
<label>Trade Direction Mode:</label>
<select id="tradeDirectionMode">
<option value="LongAndShort">LongAndShort</option>
<option value="LongOnly">LongOnly</option>
</select>
<br>
<label>Opposite Entry Signal:</label>
<select id="oppositeEntrySignal">
<option value="Ignore">Ignore</option>
<option value="Reverse">Reverse</option>
<option value="IgnoreOrReverse">IgnoreOrReverse</option>
</select>
<br>
<label>Stop Loss Usage:</label>
<select id="stopLossUsage">
<option value="AlwaysUse">AlwaysUse</option>
<option value="MayUse">MayUse</option>
<option value="DoNotUse">DoNotUse</option>
</select>
<br>
<label>Stop Loss Type:</label>
<select id="stopLossType">
<option value="Fixed">Fixed</option>
<option value="Trailing">Trailing</option>
<option value="FixedOrTrailing">FixedOrTrailing</option>
</select>
<br>
<label>Stop Loss Range Min:</label>
<input type="number" id="stopLossRangeMin">
<br>
<label>Stop Loss Range Max:</label>
<input type="number" id="stopLossRangeMax">
<br>
<label>Take Profit Usage:</label>
<select id="takeProfitUsage">
<option value="AlwaysUse">AlwaysUse</option>
<option value="MayUse">MayUse</option>
<option value="DoNotUse">DoNotUse</option>
</select>
<br>
<label>Take Profit Range Min:</label>
<input type="number" id="takeProfitRangeMin">
<br>
<label>Take Profit Range Max:</label>
<input type="number" id="takeProfitRangeMax">
<br>
<label>Max Entry Slots:</label>
<input type="number" id="maxEntrySlots">
<br>
<label>Max Exit Slots:</label>
<input type="number" id="maxExitSlots">
</div>
<div class="section">
<h2>Backtester</h2>
<label>Exit Trade At:</label>
<select id="exitTradeAt">
<option value="Open">Open</option>
<option value="Close">Close</option>
</select>
<br>
<label>Close at Backtest End:</label>
<select id="closeAtBacktestEnd">
<option value="false">False</option>
<option value="true">True</option>
</select>
</div>
<div class="section">
<h2>Data Horizon</h2>
<label>Max Data Bars:</label>
<input type="number" id="maxDataBars">
<br>
<label>Use Data Start:</label>
<select id="useDataStart">
<option value="false">False</option>
<option value="true">True</option>
</select>
<br>
<label>Data Start:</label>
<input type="text" id="dataStart">
<br>
<label>Use Data End:</label>
<select id="useDataEnd">
<option value="false">False</option>
<option value="true">True</option>
</select>
<br>
<label>Data End:</label>
<input type="text" id="dataEnd">
</div>
<div class="section">
<h2>Out of Sample</h2>
<label>Data Start Percent:</label>
<input type="number" step="0.01" id="dataStartPercent">
<br>
<label>Data End Percent:</label>
<input type="number" step="0.01" id="dataEndPercent">
</div>
<div class="section">
<h2>Trading Session</h2>
<label>Session Open:</label>
<input type="text" id="sessionOpen">
<br>
<label>Session Close:</label>
<input type="text" id="sessionClose">
<br>
<label>Friday Close:</label>
<input type="text" id="fridayClose">
<br>
<label>Trade on Sunday:</label>
<select id="tradeOnSunday">
<option value="false">False</option>
<option value="true">True</option>
</select>
<br>
<label>Close at Session Close:</label>
<select id="closeAtSessionClose">
<option value="false">False</option>
<option value="true">True</option>
</select>
<br>
<label>Close at Friday Close:</label>
<select id="closeAtFridayClose">
<option value="false">False</option>
<option value="true">True</option>
</select>
</div>
<div class="section">
<h2>Symbol Info</h2>
<label>Spread:</label>
<input type="number" id="spread">
<br>
<label>Swap Long:</label>
<input type="text" id="swapLong">
<br>
<label>Swap Short:</label>
<input type="text" id="swapShort">
<br>
<label>Commission:</label>
<input type="text" id="commission">
</div>
<div class="section">
<h2>Miscellaneous</h2>
<label>Update Best:</label>
<select id="updateBest">
<option value="false">False</option>
<option value="true">True</option>
</select>
<br>
<label>Show Top:</label>
<input type="number" id="showTop">
</div>
<div class="section">
<h2>Indicators used by the Generator</h2>
<label>Accelerator Oscillator:</label>
<input type="checkbox" id="indAcceleratorOscillator" checked>
<br>
<label>Accumulation Distribution:</label>
<input type="checkbox" id="indAccumulationDistribution" checked>
<br>
<label>ADX:</label>
<input type="checkbox" id="indAdx" checked>
<br>
<label>Alligator:</label>
<input type="checkbox" id="indAlligator" checked>
<br>
<label>Average True Range:</label>
<input type="checkbox" id="indAverageTrueRange" checked>
<br>
<label>Awesome Oscillator:</label>
<input type="checkbox" id="indAwesomeOscillator" checked>
<br>
<label>Bears Power:</label>
<input type="checkbox" id="indBearsPower">
<br>
<label>Bollinger Bands:</label>
<input type="checkbox" id="indBollingerBands" checked>
<br>
<label>Bulls Power:</label>
<input type="checkbox" id="indBullsPower">
<br>
<label>Candle Color:</label>
<input type="checkbox" id="indCandleColor" checked>
<br>
<label>Commodity Channel Index:</label>
<input type="checkbox" id="indCommodityChannelIndex" checked>
<br>
<label>Demarker:</label>
<input type="checkbox" id="indDemarker" checked>
<br>
<label>Directional Indicators:</label>
<input type="checkbox" id="indDirectionalIndicators" checked>
<br>
<label>Do Not Exit:</label>
<input type="checkbox" id="indDoNotExit">
<br>
<label>Donchian Channel:</label>
<input type="checkbox" id="indDonchianChannel">
<br>
<label>Entry Time:</label>
<input type="checkbox" id="indEntryTime">
<br>
<label>Envelopes:</label>
<input type="checkbox" id="indEnvelopes" checked>
<br>
<label>Exit Time:</label>
<input type="checkbox" id="indExitTime">
<br>
<label>Force Index:</label>
<input type="checkbox" id="indForceIndex">
<br>
<label>Long or Short:</label>
<input type="checkbox" id="indLongOrShort">
<br>
<label>MACD:</label>
<input type="checkbox" id="indMacd">
<br>
<label>MACD Signal:</label>
<input type="checkbox" id="indMacdSignal">
<br>
<label>Momentum:</label>
<input type="checkbox" id="indMomentum" checked>
<br>
<label>Money Flow Index:</label>
<input type="checkbox" id="indMoneyFlowIndex">
<br>
<label>Moving Average:</label>
<input type="checkbox" id="indMovingAverage" checked>
<br>
<label>Moving Average of Oscillator:</label>
<input type="checkbox" id="indMovingAverageOfOscillator">
<br>
<label>Moving Averages Crossover:</label>
<input type="checkbox" id="indMovingAveragesCrossover" checked>
<br>
<label>On Balance Volume:</label>
<input type="checkbox" id="indOnBalanceVolume">
<br>
<label>Pin Bar:</label>
<input type="checkbox" id="indPinBar" checked>
<br>
<label>RSI:</label>
<input type="checkbox" id="indRsi" checked>
<br>
<label>RVI:</label>
<input type="checkbox" id="indRvi">
<br>
<label>RVI Signal:</label>
<input type="checkbox" id="indRviSignal">
<br>
<label>Standard Deviation:</label>
<input type="checkbox" id="indStandardDeviation" checked>
<br>
<label>Stochastic:</label>
<input type="checkbox" id="indStochastic" checked>
<br>
<label>Stochastic Signal:</label>
<input type="checkbox" id="indStochasticSignal" checked>
<br>
<label>Volumes:</label>
<input type="checkbox" id="indVolumes">
<br>
<label>Williams Percent Range:</label>
<input type="checkbox" id="indWilliamsPercentRange" checked>
</div>
<div class="section">
<h2>Indicator options</h2>
<label for="randomizeMaMethod">Randomize Moving Average Methods:</label>
<input type="checkbox" id="randomizeMaMethod" checked><br>
<label for="maxIndicatorPeriod">Maximum period generated by the Generator:</label>
<input type="number" id="maxIndicatorPeriod" value="50"><br>
<label for="randomizeMaShift">Shift of the Moving Average indicator:</label>
<input type="checkbox" id="randomizeMaShift" checked><br>
</div>
<div class="section">
<h2>Auto-save collection</h2>
<label for="autoSaveAtMinutes">Save the collection at a particular interval in minutes:</label>
<input type="number" id="autoSaveAtMinutes" value="120"><br>
<label for="autoSaveAtCollected">Save the collection when it reaches the given count:</label>
<input type="number" id="autoSaveAtCollected" value="0"><br>
</div>
<div class="section">
<h2>Optimizer</h2>
<label for="enableOptimizer">Enable Optimizer:</label>
<select id="enableOptimizer">
<option value="false">False</option>
<option value="true">True</option>
</select><br>
<label for="numericValuesSteps">Numeric Values Steps:</label>
<input type="number" id="numericValuesSteps" value="20"><br>
<label for="optimizeProtections">Optimize Protections:</label>
<select id="optimizeProtections">
<option value="false">False</option>
<option value="true">True</option>
</select><br>
<label for="optimizeBy">Search best strategy by:</label>
<select id="optimizeBy">
<option value="NetBalance">NetBalance</option>
<option value="Profit">Profit</option>
<option value="ProfitFactor">ProfitFactor</option>
<option value="ReturnToDrawdown">ReturnToDrawdown</option>
<option value="RSquared">RSquared</option>
<option value="Stagnation">Stagnation</option>
<option value="WinLossRatio">WinLossRatio</option>
</select><br>
</div>
<div class="section">
<h2>Monte Carlo</h2>
<label for="enableMonteCarlo">Enable Monte Carlo:</label>
<select id="enableMonteCarlo">
<option value="false">False</option>
<option value="true">True</option>
</select><br>
<label for="countOfTests">Count of Tests:</label>
<input type="number" id="countOfTests" value="20"><br>
<label for="validTestsPercent">Valid Tests Percent:</label>
<input type="number" id="validTestsPercent" value="80"><br>
<label for="spreadMax">Spread Max:</label>
<input type="number" id="spreadMax" value="30"><br>
<label for="slippageMax">Slippage Max:</label>
<input type="number" id="slippageMax" value="20"><br>
<label for="skipEntriesPercent">Skip Entries Percent:</label>
<input type="number" id="skipEntriesPercent" value="2"><br>
<label for="skipExitsPercent">Skip Exits Percent:</label>
<input type="number" id="skipExitsPercent" value="2"><br>
<label for="randClosePercent">Random Close Percent:</label>
<input type="number" id="randClosePercent" value="0"><br>
<label for="indParamsChangeProbability">Indicator Parameters Change Probability:</label>
<input type="number" id="indParamsChangeProbability" value="0"><br>
<label for="indParamsMaxChangePercent">Indicator Parameters Max Change Percent:</label>
<input type="number" id="indParamsMaxChangePercent" value="20"><br>
<label for="indParamsMinDeltaSteps">Indicator Parameters Min Delta Steps:</label>
<input type="number" id="indParamsMinDeltaSteps" value="20"><br>
<label for="randFirstBarPercent">Random First Bar Percent:</label>
<input type="number" id="randFirstBarPercent" value="10"><br>
<label for="mcMaxConsecutiveLosses">MC Max Consecutive Losses:</label>
<input type="number" id="mcMaxConsecutiveLosses" value="0"><br>
<label for="mcMaxDrawdownPercent">MC Max Drawdown Percent:</label>
<input type="number" id="mcMaxDrawdownPercent" value="0"><br>
<label for="mcMaxEquityDrawdown">MC Max Equity Drawdown:</label>
<input type="number" id="mcMaxEquityDrawdown" value="0"><br>
<label for="mcMaxStagnationDays">MC Max Stagnation Days:</label>
<input type="number" id="mcMaxStagnationDays" value="0"><br>
<label for="mcMaxStagnationPercent">MC Max Stagnation Percent:</label>
<input type="number" id="mcMaxStagnationPercent" value="0"><br>
<label for="mcMinCountOfTrades">MC Min Count of Trades:</label>
<input type="number" id="mcMinCountOfTrades" value="100"><br>
<label for="mcMinProfit">MC Min Profit:</label>
<input type="number" id="mcMinProfit" value="10"><br>
<label for="mcMinProfitFactor">MC Min Profit Factor:</label>
<input type="number" id="mcMinProfitFactor" value="0"><br>
<label for="mcMinProfitPerDay">MC Min Profit Per Day:</label>
<input type="number" id="mcMinProfitPerDay" value="0"><br>
<label for="mcMinRSquared">MC Min R-Squared:</label>
<input type="number" id="mcMinRSquared" value="0"><br>
<label for="mcMinReturnToDrawdown">MC Min Return-to-Drawdown:</label>
<input type="number" id="mcMinReturnToDrawdown" value="0"><br>
<label for="mcMinWinLossRatio">MC Min Win Loss Ratio:</label>
<input type="number" id="mcMinWinLossRatio" value="0"><br>
</div>
<button onclick="exportINI()">Export INI Settings</button>
<script>
function exportINI() {
const settings = {
'Data Source': {
server: document.getElementById('server').value,
symbol: document.getElementById('symbol').value,
period: document.getElementById('period').value,
data_file: document.getElementById('dataFile').value
},
'Input and Output': {
input: document.getElementById('input').value,
output: document.getElementById('output').value,
output_replace: document.getElementById('outputReplace').value,
validate_then_generate: document.getElementById('validateThenGenerate').value
},
'Collection': {
collection_capacity: document.getElementById('collectionCapacity').value,
sort_by: document.getElementById('sortBy').value,
correlation_threshold: document.getElementById('correlationThreshold').value,
resolve_correlation: document.getElementById('resolveCorrelation').value,
resolve_similar_rules: document.getElementById('resolveSimilarRules').value
},
'Generator Stop': {
max_ascended_strategies: document.getElementById('maxAscendedStrategies').value,
max_calculated_strategies: document.getElementById('maxCalculatedStrategies').value,
max_working_minutes: document.getElementById('maxWorkingMinutes').value
},
'Acceptance Criteria': {
max_consecutive_losses: document.getElementById('maxConsecutiveLosses').value,
max_drawdown_percent: document.getElementById('maxDrawdownPercent').value,
max_equity_drawdown: document.getElementById('maxEquityDrawdown').value,
max_stagnation_days: document.getElementById('maxStagnationDays').value,
max_stagnation_percent: document.getElementById('maxStagnationPercent').value,
min_count_of_trades: document.getElementById('minCountOfTrades').value,
min_profit: document.getElementById('minProfit').value,
min_profit_factor: document.getElementById('minProfitFactor').value,
min_profit_per_day: document.getElementById('minProfitPerDay').value,
min_r_squared: document.getElementById('minRSquared').value,
min_return_to_drawdown: document.getElementById('minReturnToDrawdown').value,
min_win_loss_ratio: document.getElementById('minWinLossRatio').value
},
'Account Settings': {
account_currency: document.getElementById('accountCurrency').value,
initial_account: document.getElementById('initialAccount').value,
leverage: document.getElementById('leverage').value
},
'Strategy Properties': {
entry_lots: document.getElementById('entryLots').value,
trade_direction_mode: document.getElementById('tradeDirectionMode').value,
opposite_entry_signal: document.getElementById('oppositeEntrySignal').value,
stop_loss_usage: document.getElementById('stopLossUsage').value,
stop_loss_type: document.getElementById('stopLossType').value,
stop_loss_range_min: document.getElementById('stopLossRangeMin').value,
stop_loss_range_max: document.getElementById('stopLossRangeMax').value,
take_profit_usage: document.getElementById('takeProfitUsage').value,
take_profit_range_min: document.getElementById('takeProfitRangeMin').value,
take_profit_range_max: document.getElementById('takeProfitRangeMax').value,
max_entry_slots: document.getElementById('maxEntrySlots').value,
max_exit_slots: document.getElementById('maxExitSlots').value
},
'Backtester': {
exit_trade_at: document.getElementById('exitTradeAt').value,
close_at_backtest_end: document.getElementById('closeAtBacktestEnd').value
},
'Data Horizon': {
max_data_bars: document.getElementById('maxDataBars').value,
use_data_start: document.getElementById('useDataStart').value,
data_start: document.getElementById('dataStart').value,
use_data_end: document.getElementById('useDataEnd').value,
data_end: document.getElementById('dataEnd').value
},
'Out of Sample': {
data_start_percent: document.getElementById('dataStartPercent').value,
data_end_percent: document.getElementById('dataEndPercent').value
},
'Trading Session': {
session_open: document.getElementById('sessionOpen').value,
session_close: document.getElementById('sessionClose').value,
friday_close: document.getElementById('fridayClose').value,
trade_on_sunday: document.getElementById('tradeOnSunday').value,
close_at_session_close: document.getElementById('closeAtSessionClose').value,
close_at_friday_close: document.getElementById('closeAtFridayClose').value
},
'Symbol Info': {
spread: document.getElementById('spread').value,
swap_long: document.getElementById('swapLong').value,
swap_short: document.getElementById('swapShort').value,
commission: document.getElementById('commission').value
},
'Miscellaneous': {
update_best: document.getElementById('updateBest').value,
show_top: document.getElementById('showTop').value
},
'Indicators used by the Generator': {
ind_accelerator_oscillator: document.getElementById('indAcceleratorOscillator').checked,
ind_accumulation_distribution: document.getElementById('indAccumulationDistribution').checked,
ind_adx: document.getElementById('indAdx').checked,
ind_alligator: document.getElementById('indAlligator').checked,
ind_average_true_range: document.getElementById('indAverageTrueRange').checked,
ind_awesome_oscillator: document.getElementById('indAwesomeOscillator').checked,
ind_bears_power: document.getElementById('indBearsPower').checked,
ind_bollinger_bands: document.getElementById('indBollingerBands').checked,
ind_bulls_power: document.getElementById('indBullsPower').checked,
ind_candle_color: document.getElementById('indCandleColor').checked,
ind_commodity_channel_index: document.getElementById('indCommodityChannelIndex').checked,
ind_demarker: document.getElementById('indDemarker').checked,
ind_directional_indicators: document.getElementById('indDirectionalIndicators').checked,
ind_do_not_exit: document.getElementById('indDoNotExit').checked,
ind_donchian_channel: document.getElementById('indDonchianChannel').checked,
ind_entry_time: document.getElementById('indEntryTime').checked,
ind_envelopes: document.getElementById('indEnvelopes').checked,
ind_exit_time: document.getElementById('indExitTime').checked,
ind_force_index: document.getElementById('indForceIndex').checked,
ind_long_or_short: document.getElementById('indLongOrShort').checked,
ind_macd: document.getElementById('indMacd').checked,
ind_macd_signal: document.getElementById('indMacdSignal').checked,
ind_momentum: document.getElementById('indMomentum').checked,
ind_money_flow_index: document.getElementById('indMoneyFlowIndex').checked,
ind_moving_average: document.getElementById('indMovingAverage').checked,
ind_moving_average_of_oscillator: document.getElementById('indMovingAverageOfOscillator').checked,
ind_moving_averages_crossover: document.getElementById('indMovingAveragesCrossover').checked,
ind_on_balance_volume: document.getElementById('indOnBalanceVolume').checked,
ind_pin_bar: document.getElementById('indPinBar').checked,
ind_rsi: document.getElementById('indRsi').checked,
ind_rvi: document.getElementById('indRvi').checked,
ind_rvi_signal: document.getElementById('indRviSignal').checked,
ind_standard_deviation: document.getElementById('indStandardDeviation').checked,
ind_stochastic: document.getElementById('indStochastic').checked,
ind_stochastic_signal: document.getElementById('indStochasticSignal').checked,
ind_volumes: document.getElementById('indVolumes').checked,
ind_williams_percent_range: document.getElementById('indWilliamsPercentRange').checked
},
'Indicators options': {
randomize_ma_method: document.getElementById('randomizeMaMethod').checked,
max_indicator_period: document.getElementById('maxIndicatorPeriod').value,
randomize_ma_shift: document.getElementById('randomizeMaShift').checked
},
'Auto-save collection': {
auto_save_at_minutes: document.getElementById('autoSaveAtMinutes').value,
auto_save_at_collected: document.getElementById('autoSaveAtCollected').value
},
'Optimizer': {
enable_optimizer: document.getElementById('enableOptimizer').value,
numeric_values_steps: document.getElementById('numericValuesSteps').value,
optimize_protections: document.getElementById('optimizeProtections').value,
optimize_by: document.getElementById('optimizeBy').value
},
'Monte Carlo': {
enable_monte_carlo: document.getElementById('enableMonteCarlo').value,
count_of_tests: document.getElementById('countOfTests').value,
valid_tests_percent: document.getElementById('validTestsPercent').value,
spread_max: document.getElementById('spreadMax').value,
slippage_max: document.getElementById('slippageMax').value,
skip_entries_percent: document.getElementById('skipEntriesPercent').value,
skip_exits_percent: document.getElementById('skipExitsPercent').value,
rand_close_percent: document.getElementById('randClosePercent').value,
ind_params_change_probability: document.getElementById('indParamsChangeProbability').value,
ind_params_max_change_percent: document.getElementById('indParamsMaxChangePercent').value,
ind_params_min_delta_steps: document.getElementById('indParamsMinDeltaSteps').value,
rand_first_bar_percent: document.getElementById('randFirstBarPercent').value,
mc_max_consecutive_losses: document.getElementById('mcMaxConsecutiveLosses').value,
mc_max_drawdown_percent: document.getElementById('mcMaxDrawdownPercent').value,
mc_max_equity_drawdown: document.getElementById('mcMaxEquityDrawdown').value,
mc_max_stagnation_days: document.getElementById('mcMaxStagnationDays').value,
mc_max_stagnation_percent: document.getElementById('mcMaxStagnationPercent').value,
mc_min_count_of_trades: document.getElementById('mcMinCountOfTrades').value,
mc_min_profit: document.getElementById('mcMinProfit').value,
mc_min_profit_factor: document.getElementById('mcMinProfitFactor').value,
mc_min_profit_per_day: document.getElementById('mcMinProfitPerDay').value,
mc_min_r_squared: document.getElementById('mcMinRSquared').value,
mc_min_return_to_drawdown: document.getElementById('mcMinReturnToDrawdown').value,
mc_min_win_loss_ratio: document.getElementById('mcMinWinLossRatio').value
}
};
// Convert settings object to INI format
let iniData = '';
for (const section in settings) {
iniData += `[${section}]\n`;
for (const key in settings[section]) {
iniData += `${key} = ${settings[section][key]}\n`;
}
iniData += '\n';
}
// Export INI data as a file
const blob = new Blob([iniData], { type: 'text/plain' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = 'settings.ini';
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
URL.revokeObjectURL(url);
}
</script>
</body>
</html>