Initial Commit ...

This commit is contained in:
2024-01-25 04:03:36 +03:30
commit 0a19e0f4e1
217 changed files with 41677 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
# Best Way to Code Trade Once per Bar at Open on MT4
So there are various ways to code an EA to trade once per bar.
```mq4
int BarsCount = 0;
if (Bars>BarsCount) {
Do the algo and then
BarsCount = Bars;
}
```
```mq4
static datetime prevtime = 0;
if(prevtime == Time[0]) return;
prevtime = Time[0];
Do the algo here after the code
```
```mq4
if (Time[0] >= TimeCurrent()) {
Do the algo here
}
```
```mq4
int BarsCount = 0
if (Bars>BarsCount) etc.
```
```mq4
static datetime prevtime = Time[0];
if (prevtime == Time[0]) return;
prevtime = Time[0];
```
```mq4
```