Okay, here is a breakdown of what the script does, explained for someone who doesn't know how to program:
**Overall Purpose**
This script is designed to automatically trade on the MetaTrader platform based on certain market conditions and strategies. It aims to find trends and execute trades, while also managing risk and profit.
**Core Functionality**
1. **Setting Parameters:** The script starts by defining a set of adjustable settings (external variables) that a user can tweak. These settings control how the script behaves. Examples include:
* Lot size (how big each trade should be)
* Stop Loss (how much money to risk on each trade)
* Take Profit (how much profit to aim for on each trade)
* Trailing Stop (automatically adjusting the stop loss as the price moves in a favorable direction)
* Moving Averages (settings related to moving averages for analysis)
* Equity stop (Stop the trades when the profit get lower then the specified equity)
* Number of maximum trades.
* Break even (move the stop loss to the order price if it gets to certain amount of profits)
2. **Initialization:** When the script starts up, it performs some initial setup tasks, like calculating certain coefficients for different timeframes. Also it checks the minimal distance to change or modify a trade.
3. **"OnTick" Event (The Main Loop):** The script's core logic resides within a function that runs every time there's a price change ("tick") in the market. This is where the script constantly monitors the market and makes decisions.
4. **Check for a New Bar:** Checks if the bar has changed in the chart if it does it will activate this function.
5. **Equity Stop Loss:** The Script can monitor total profit and loss and trigger if the equity drops bellow or above a certain point.
6. **Money trailing stop:** Moves stop loss based on profits and equity.
7. **Moving to break even :** Will move the stop loss in profit
8. **Trailing Stop Loss:** If enabled, the script will watch open trades and automatically adjust the stop loss as the price moves in a profitable direction. The trailing stop aims to lock in profits while still allowing the trade to continue to gain.
9. **Trend Identification/Trade Signals:** It uses technical indicators (like moving averages and momentum) to identify potential buying or selling opportunities. It looks for specific patterns and crossovers in these indicators to determine the likely direction of the price. It also checks money volume.
10. **Order Execution:** If the script identifies a valid trade signal (based on its indicators and rules), it will automatically place a buy or sell order on the MetaTrader platform. Before placing the order, the script checks if there's enough money in the account and confirm the stop loss values.
11. **Order Modification:** The Script then modifies if the trade is valid it, changes the take profits and stop losses.
12. **Money Take Profit :** This script feature allow to close every trade with the same currency when profit is accomplished.
13. **Take Profit and Stop Loss Management:**
* It can set Take Profit/Stop Loss in currency (ex 10$).
* It can set Take Profit/Stop Loss in percentage (ex 10% of the balance).
**Key Concepts**
* **Expert Advisor (EA):** This script is an example of an EA, which is a program that automates trading strategies on the MetaTrader platform.
* **Technical Indicators:** These are mathematical calculations based on historical price and volume data. They are used to forecast future price movements. Common ones include moving averages, momentum, and MACD.
* **Lot Size:** The size of the trade being placed (e.g., 0.01 lots, 0.1 lots, etc.). Larger lot sizes can lead to larger profits, but also larger losses.
* **Stop Loss:** An order placed with a broker to automatically close a trade if the price reaches a certain loss level. It's a risk management tool.
* **Take Profit:** An order placed with a broker to automatically close a trade when the price reaches a certain profit level. It's a way to secure profits.
* **Trailing Stop:** A stop-loss order that automatically adjusts as the price moves in a profitable direction.
**In Simple Terms**
Imagine this script as a robot that watches the market for you. You give it some instructions (the settings), and it follows those instructions to identify trades and manage your money. It uses charts and some math to guess which way prices will move, and then it automatically buys or sells. It also tries to protect your money by setting limits on how much you can lose, and it tries to take profits when it can.
Price Data Components
Orders Execution
Indicators Used
Miscellaneous
2
Views
0
Downloads
0
Favorites
TREND FINDER
ÿþ/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
/ / | P r o j e c t N a m e |
/ / | C o p y r i g h t 2 0 1 8 , C o m p a n y N a m e |
/ / | h t t p : / / w w w . c o m p a n y n a m e . n e t |
/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
/ / | T R E N D F I N D E R |
/ / | h t t p s : / / 5 d 3 0 7 1 2 0 8 c 5 e 2 . s i t e 1 2 3 . m e / |
/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
# p r o p e r t y c o p y r i g h t "