Browse Source

Merge branch 'indicator_bug_fix' of Faiz.Ali/pulse_ea_project_mt5 into master

Wajeeh Saqib 2 months ago
parent
commit
cb1c3d6ba0

BIN
EA_MT5/Pulse_EA_project_MT5.ex5


BIN
EA_MT5/Pulse_EA_project_MT5.mq5


+ 93 - 0
EA_MT5/README.md

@@ -0,0 +1,93 @@
1
+# Pulse_EA Project
2
+
3
+## Features
4
+
5
+- Supports **Tally Sim** and **Tally Trade** modes.
6
+- Automated **Buy/Sell trade placement** with virtual TP/SL checks.
7
+- Virtual trade visualization:
8
+  - Arrows for trade open/close
9
+  - Dotted trendlines connecting open/close prices
10
+  - Profit labels on the chart
11
+- Copy trading support.
12
+- Daily drawdown limit management.
13
+- Time-based trading control (start/end times, Monday open, Friday close).
14
+- Trade logging in CSV files for analysis.
15
+- Integration with custom indicators (Pulse Balance Indicator Sim).
16
+
17
+## How It Works
18
+1. **Initialization**: Sets EA mode, initializes trading parameters, connects to custom indicators if Tally_Trade mode.
19
+2. **OnTick Function**: Checks time filters, daily drawdown, and new bar conditions.
20
+3. **Trade Management**:
21
+   - Places Buy or Sell trades according to selected strategy.
22
+   - Checks virtual TP/SL to manage open trades.
23
+   - Updates trade structure and writes trade data to CSV.
24
+4. **Visualization**:
25
+   - Draws virtual open/close arrows.
26
+   - Draws dotted trendlines for closed trades.
27
+   - Displays profit labels on chart.
28
+5. **Daily & Weekly Rules**: Respects Monday open, Friday close, and daily drawdown limit.
29
+6. **Tally Trade**: when the trade is placed check indicator values of Pulse indicator sim if balce is greater than the ma value copy the trade.
30
+7. **Tally Sim**: when EA Places on chart it place the trade and virtually checks tp/sl hit and update the logs into the excel file later on the file will used by the indicator to plot indicator buffer values on the chart that will fetched by the Tally trade.
31
+
32
+## Input Parameters
33
+
34
+### General Settings
35
+- `eaType`: Select `Tally_Sim` or `Tally_Trade`.
36
+- `tpPips`: Take Profit in pips.
37
+- `slPips`: Stop Loss in pips.
38
+- `lot`: Default lot size.
39
+
40
+### Tally Sim Settings
41
+- `ordTyp`: Order type (`buy` or `reverse`).
42
+- `magicNo`: Magic number for trades.
43
+- `fileName`: File name for CSV logging.
44
+
45
+### Tally Trade Settings
46
+- `tradesDirection`: Direction of trade (`buy` or `reverse`).
47
+- `magicNo1`: Copy trade magic number.
48
+- `CopyTallyTrade`: Enable or disable copy trading.
49
+- `glTp`: Global Take Profit.
50
+- `glSl`: Global Stop Loss.
51
+
52
+### Display Settings
53
+- `tradeLineThickness`: Thickness of trade trendlines.
54
+- `dollarFontSize`: Font size for profit labels.
55
+- `dollarFontColor`: Font color for profit labels.
56
+- `horizontalLineName`: Name for horizontal lines.
57
+
58
+### Time Filter Settings
59
+- `enableTimeFilter`: Enable or disable time-based trading.
60
+- `startTime`: Trading session start time.
61
+- `endTime`: Trading session end time.
62
+- `useFridayClose`: Close trades on Friday.
63
+- `closeFriday`: Friday close time.
64
+- `useMondayOpen`: Start trades on Monday.
65
+- `mondayOpen`: Monday open time.
66
+
67
+### Daily Draw Limit Settings
68
+- `UseDailyDrawdownLimit`: Enable daily drawdown limit.
69
+- `DailyDrawdownAmount`: Maximum allowed drawdown.
70
+- `DrawdownResetTime`: Time to reset drawdown.
71
+
72
+### Indicator Settings
73
+- `Dot_Color`: Color of indicator dots.
74
+- `StartingBalance`: Starting balance for the strategy.
75
+- `MagicNumbers`: Magic numbers for indicator.
76
+- `MA_Period`: Moving Average period.
77
+- `MA_Method`: Moving Average method.
78
+- `historyTrades`: Number of history trades considered.
79
+
80
+
81
+## Trade Logging
82
+All trade data is saved in a CSV file named using the `fileName` parameter. Each entry contains:
83
+- Ticket
84
+- Type (Buy/Sell)
85
+- Magic number
86
+- Open price
87
+- Close price
88
+- Open time
89
+- Close time
90
+- SL
91
+- TP
92
+- Lot size
93
+- Profit

BIN
Updated_Indicator_file/Pulse Balance Indicator Sim.ex5


BIN
Updated_Indicator_file/Pulse Balance Indicator Sim.mq5