The script is based on the simulation of trading transactions using a random number generator. Thanks to this, you can get completely
different results, even with the same input parameters. When you run the script, a dialog box opens where you can set the
desired values of external variables.
The Trading options block defines the main parameters that are necessary for modeling trading.
- Start Balance-sets the initial size of the trade balance.
- Number Trade-sets the number of trade transactions that will be modeled when the script is running. For
in order to get more or less significant results, this parameter must be greater than 30.
- Probability Winning – the probability of a winning trade. Specified as a percentage, the allowed value is from 1 to 99.
- Min. StopLoss-specifies the minimum StopLoss value in points to be used when
modeling of trading operations.
- Max. StopLoss-sets the maximum value of StopLoss in points.
- Positive Win. – this variable sets the correction that results in a positive win.
the mathematical expectation in the simulated transaction.
The script works by performing the following actions. First, the expected probability of a winning trade – PW-is calculated. After that,
the StopLoss value is randomly set, which will be used in this transaction. Given that the mathematical
expectation of a win must be positive, the TakeProfit size is calculated. The TakeProfit and StopLoss levels, taking into account the value of the point, are
converted to the values of possible gains and losses – Profit and Loss. In conclusion, the result of the transaction is determined – a win (“1”) or a
loss (“-1”). All data is saved in the file “SpecificationsTrade. csv” in the last line of which the total amount of
winnings in this series of transactions is indicated.
[spoiler title=”Read More…”]
The resulting transaction values are transmitted to the Money management systems block, where you can select the money management systems you are interested in.
- Fixed Lot-trading a fixed lot. The results are saved in the “FixedLot.csv” file.
The “Bal.” column indicates the value of the trade balance before opening a trade, and the “Rez” column indicates its result.
- Fixed Percentage-fixed percentage trading. Simulation results
they are written to the “FixedPercentage.csv” file. The “Bal.” column stores the balance value, and the “Lot” column stores the lot size for the transaction,
and in the column “Rez” – its result.
- Moral Expectation-trading is modeled based on moral expectation. When modeling
restrictions on the required number of transactions and the size of the trade balance are not taken into account. Thanks to this, you can more accurately
select the parameters of the trading system for trading on this money management system. The results are written to a file
- Theory Perspective-trading using theory-based money management
- Frac. Linear Growth-trade modeling using fractional-linear growth.
- Linear Growth-trading using a linear growth model.
- Power Growth – modeling of power growth in trading.
- Exponential Growth-application of the exponential growth model.
- Hyperbolic Growth-shows trading when using the hyperbolic growth model.
- Hyperbolic Exponential Growth-models usage
with capital on Forex”