EA reading orders from CSV, with limitations

2019.12.04 Experts

Specification

(NO OFFER ACCEPTED YET!)



 

I need an MT4 EA that reads orders from a CSV file. 

the CSV file "SIGNALS" (name can be different/changed) gets nonstop updated from an excel file (through VBA macro) every 10-30 seconds. File being nonstop updated should cause zero issue for EA. 

 

Csv file, columns:

1st column is pair (all 28 pairs always remain, but order keeps changing)

2nd column: buy or sell signals

3rd column: Lot size

4th column: stop in points (not pips)

5th column: profit in points (not pips)

6th column: comment

7th column: close signal (mostly contains buy or sell signal, even if no buy or sell signal in 2nd column. As soon as it shows  oppositesignal of an existing open order it gets closed (if "signal" is selected in "closing method" of course). example: AUDCAD got opened with BUY, as soon as SELL in 7th column, it gets closed.)

 

As soon as second column shows buy or sell, an order gets created from EA according to lot, stop, profit, and with comment (comment can’t contain additional info for EA, only the comment from csv file).

So the EA has to open and close orders according CSV file all by itself after each CSV update, and according inputs.

As the CSV file gets nonstop auto updated, the values of signal, lot, stop, profit and comment can change but should have NO effect on existing/open orders.

CSV file where it takes signals from can be changed in inputs while EA is running (location will always be MT4 Files folder, no other option possible).

Order/ranking of the pairs in csv file can change often.

 

Including source code. This EA is for personal use only.

 

 

 

 

 


INPUTS (explanations 2 pages later)

 

inputs1

inputs2


 

INPUTS (with explanations)

 

Closing method:take profit / signal (dropdown list. "take profit" as preset. take profit= waiting for take profit regardless "close signal" in 7th column. signal= order closes as soon as excel column "close signal" (7th column) shows opposite signal of open order. Take profit = order gets created with SL and TP, signal = order gets created only with SL). Example: AUDCAD gets a buy signal in 2 ndcolumn, as soon as 7 thcolumn shows SELL, order gets closed.

Closing signal only if in profit: true / false (dropdown list. False as preset. If "closing method" signal chosen, it only closes by signal if trade in profit. So if trade is in loss and closing signal appears, it will ignore it until trade is in profit. As soon as trade is in profit, it is allowed to close by signal)

=========================== (please make lines same length)

Reopen order:true / false (dropdown list. "false" as preset. true= instantly if signal remains, false= no order of this pair until signal reappears. example: there was a EURGBP signal, it hits take profit, and signal remains in csv file. if "true" = instantly reopen, if "false" signal has first go away, and as soon as it comes back it is allowed to create an order again)

===========================

Block time loss:360 (minutes. Example: if trade hits loss, 360 minutes no more trade of this pair.)

Block time win:(minutes. Example: if trade gets profit, X minutes no more trade of this pair.)

===========================

Block pair after losses:(block pair entire day after 1 loss, if 0 or empty = disabled) 

Block currency after losses:(if AUDJPY CADJPY loss, no more JPY trades entire day)

 (it counts the opening of the trade, when Monday few trades opened and close on Tuesday in loss, they have no effect on Tuesday as they got opened on Monday)

===========================

===========================

Maximum open orders:10 (maximum open orders at the same time. if 0 or empty = disabled)

Maximum open orders per pair:(maximum open orders at the same time per pair. if 0 or empty = disabled. If more than 1, it opens more of the pair as soon as signal reappears)

Maximum open orders per currency:(maximum open orders at the same time per currency. if 0 or empty = disabled. Example: AUDJPY, CHFJPY open orders, no more open pairs with JPY allowed.)

===========================

Maximum trades per day per pair:

Maximum trades per day per currency:3  

Maximum trades per day:30 

(if 0 or empty = disabled) (maximum of trades getting opened same day)

===========================

===========================

Daily start EA at:   (if left blank it starts instantly or at opening)

Stop EA Mo-Th at:    (no more new trades after this time. disabled if left blank)

Stop EA Friday at:   (time, HH:MM. if left blank it trades until market close)

(if “daily start EA at 06:00” and “stop EA Friday at 15:00” would mean EA starts every monday 06:00 and stops every friday 15:00 all by itself)

Close all open orders Mo-Th at:    (Time HH:MM. If left blank, no closing monday to Thursday. Including pending orders)

Close all open orders on Friday at:    (Time. If left blank, no closing. Including pending orders)

Times not to trade A: 15:00, 05:00 (preset: empty. From 15:00 to 5:00 no new orders. if left blank, nothing)

Times not to trade B

Times not to trade C: 

===========================

===========================

When equity % above balance:2 (preset: empty. when balance $100 and equity above $102, 2 options below get triggered. If zero or empty = disabled)

When equity % below balance: 3  (If zero or empty = disabled)

Close all trades: yes / no (No as preset)

Stop EA: true / false (False as preset. “Daily start EA at” will continue the EA)

===========================

When equity above:   (example: equity above $1000, 2 options below get triggered. If zero or empty = disabled)

When equity below:   (If zero or empty = disabled)

Close all trades: yes / no (No as preset)

Stop EA: true / false (False as preset. “Daily start EA at” will continue the EA)

===========================

When balance above:  (example: balance above $1000, 2 options below get triggered. If zero or empty = disabled)

When balance below:  (If zero or empty = disabled)

Close all trades: yes / no (No as preset)

Stop EA: true / false (False as preset. “Daily start EA at” will continue the EA)

===========================

===========================

BLOCK BY MOMENTUM:true / false (dropdown list. enabled/disabled)

Momentum timeframe:M1 (M1 M5 M15 M30 H1 H4 D1 W1 MN, dropdown list of all timeframes)

Momentum period: 1

Momentum max difference:0.5 (can’t be above 100.5 and below 99.5)

Bars back:1200 (not trade a pair if momentum was above 100.5 or below 99.5 in the last 1200 bars of selected timeframe, including current bar.)

===========================

MAXIMUM FLUCTUATION:true/false (dropdown list. enabled/disabled)

ATR Timeframe:H4 (dropdown list M1 M15 M30 H1 H4 D1 W1 MN)

ATR period: 24

Multiplicator: 0.9

Time Range TF: M1 (dropdown list M1 M15 M30 H1 H4 D1 W1 MN)

Bars back:500

===========================

===========================

Magic number: 12345

===========================

CSV file name: SIGNALS.CSV (SIGNALS.CSV as preset. File where it takes signals from can be changed while EA is running)

 

 


 

 

Details MAXIMUM FLUCTUATION

(example: GBPAUD with above settings, calculated ATR would be 585 points, and Time Range would be 500 minutes. Current price is 1.90102, if price was higher or lower than 585 points distance within last 500 minutes, it will not take the trade. So price is not allowed to be above 1.90687 (1.90102 + 585 points) and not allowed to be below 1.89517 (1.90102 - 585 points) within last 500 minutes. This is to avoid trades during higher volatility. 

 

max fluctuation

 

 

 

Files:

Responded

1
Developer 1
2019.12.04
Rating
5
(2)
Projects
4
0%
Arbitration
1
0% / 100%
Overdue
1
25%
Working
2
Developer 2
Yesterday
Rating
4.91
(101)
Projects
137
43%
Arbitration
7
29% / 29%
Overdue
4
3%
Busy
3
Developer 3
Yesterday
Rating
4.68
(183)
Projects
375
29%
Arbitration
145
20% / 50%
Overdue
135
36%
Loaded
4
Developer 4
Yesterday
Rating
5
(2)
Projects
6
0%
Arbitration
2
50% / 0%
Overdue
2
33%
Working

Project information

Budget
30 - 40 USD
For the developer
27 - 36 USD
Deadlines
from 1 to 5 day(s)

Customer

Placed orders4
Arbitrage count1