İş tamamlandı
İş Gereklilikleri
SCRIPT NAME: Active Trader Bot.
PROJECT GOAL: Create a script or EA that will scan a directory for new text files. Once a text file is created in the directory, the script will immediately read the file information and open an order in MetaTrader 5. The script will screen and regulate how many orders are opened at any given time. The script will not open too many orders at one time. All files created in the folder will be processed .
DETAILS: The script needs these settings for the user to screen and regulate how many files are used to open orders. The following settings will be available to the user:
1. A button on the chart to enable or disable the script and show that the script is running.
2. The script will empty the directory when the script is first enabled. No existing files will be used to open orders. These will be moved to old files directory below.
3. Setting for Scan Directory to scan for .new files.
4. Setting for Secondary Directory to move scanned files to (.old and .opn).
5. Settings to restrict how frequently orders are opened:
a. Setting for How many orders to open at one time.
b. Setting for How many orders to open per X minutes.
c. Setting for Minimum Margin % Level required to Open orders.
d. Setting for order size.
The script will watch a directory where the files are being created. The script will determine if the condition settings above are true to open an order. If the above conditions are true the script will read the file and open an order. If the above conditions are false the script will not open an order. After the files have been read by the script the files will be renamed and moved to another directory. Files that are used to open an order will be renamed to .OPN extensions and files that are not used to open an order will be renamed to .OLD.
The filename will be in this format:
PAIR-DATE-TIME-POSITION-STOPLOSS-TAKEPROFIT-RANDOMCODE.new
The file contents will be in this format:
PAIR, DATE, TIME, POSITION, STOPLOSS, PROFIT
EXAMPLE Filename:
USDJPY-20180911-214300-BUY-150-50-1KU53I.new
EXAMPLE File Contents:
USDJPY, 20180911, 214300, BUY, 150, 50
If the above settings to regulate orders are true, the file is used to open an order. After the order is opened, the scanned file will be renamed to .OPN and moved to the second directory. For example:
USDJPY-20180911-214300-BUY-150-50-1KU53I.opn
If additional files are created and the above settings to regulate orders are false, the script will rename and move the file to the second directory and rename the file with .OLD. For example:
USDJPY-20180911-214400-BUY-150-50-ON3M26.old
The stop loss and take profit information is shown in points and not pips. 50 equals 5 pips and 150 equals 15 pips. If the file contents have 0 for stop loss or take profit then no stop loss or take profit will be set.