• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 7:42pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 7:42pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Trading is this Simple? Finally Explained simple and clearly! 46 replies

Simple 3 order GBPUSD EA 1,047 replies

Experiment with "Simple H1 GBPUSD EA" 4 replies

Simple 5m GBPUSD trade system 10 replies

SIMPLE EA for a simple method needed!! 1 reply

  • Trading Systems
  • /
  • Reply to Thread
  • Subscribe
  • 707
Attachments: Simple H1 GBPUSD EA
Exit Attachments
Tags: Simple H1 GBPUSD EA
Cancel

Simple H1 GBPUSD EA

  • Last Post
  •  
  • 1 492493494495496 Page 497
  • 1 496 Page 497
  •  
  • Post #9,921
  • Quote
  • Mar 10, 2023 3:52pm Mar 10, 2023 3:52pm
  •  MacMG
  • | Joined Oct 2008 | Status: Another beginner | 339 Posts
Quoting h1307
Disliked
{quote} I know MQL5 (MT5 programing), I know python etc, but I have no idea of strategies...or I have but no one works as i wish So if anyone has an (programable) idea or rather verified idea , let me know
Ignored
Hi h1307.
Can you rewrite, let's say OverNight v9 EA in MQL5 and share with us mq5 file?
Just thinking!

Mac.
 
1
  • Post #9,922
  • Quote
  • Edited 6:54am Mar 14, 2023 6:42am | Edited 6:54am
  •  MacMG
  • | Joined Oct 2008 | Status: Another beginner | 339 Posts
Hi.
As I previously mention, on this tread we have four working EA’s and all required extensive optimization to be reasonably effective and profitable.
Optimization process on MT4 platform however, appears to me quite tricky. Very similar effectiveness comes from testing process. I personally found both of them in term of results unclear and far from reality.
The parameters they return hard to interpret or useless.
Therefore, I build-in to any Ea’s I’m going to test or optimize, my own parameters which are in my believes more helpful.
So;
1/ "spreadCount;"

void OnTick()
{//1
//+------------------
spread=MarketInfo(Symbol(),MODE_SPREAD);
if(spread!=0)
{//2
if(spreadCount < spread)
{//3
spreadCount = spread;
}
else
{//3
spreadCount=spreadCount;
}
}

You will be very surprise to find that huge spread increases which effectively whip out you “stoplosses”.


Mac.
 
 
  • Post #9,923
  • Quote
  • Mar 14, 2023 6:56am Mar 14, 2023 6:56am
  •  MacMG
  • | Joined Oct 2008 | Status: Another beginner | 339 Posts
2/ "maxDrawDown;"


if(iTotalOrders != 0)
{//2
double profitLoss;
profitLoss = AccountBalance()-AccountEquity();

if(profitLoss > maxDrawDown)
{//3
maxDrawDown = profitLoss;
}
else {maxDrawDown = maxDrawDown;}
This will help you in simple way to asses level of you capital designated to the EA one pair of currency.

Mac
 
 
  • Post #9,924
  • Quote
  • Edited 2:56pm Mar 14, 2023 6:57am | Edited 2:56pm
  •  MacMG
  • | Joined Oct 2008 | Status: Another beginner | 339 Posts
3/ EA_valid;

EA_valid =" Yes ";

if(TimeYear(TimeCurrent()) <= EndYear)
{//2
if(TimeMonth(TimeCurrent()) <= EndMonth )
{//3
if(TimeDay(TimeCurrent()) <= EndDay)
{//4
IsEA_valid=true;
}
else
{//4
EA_valid=" NO_EndDay ";
IsEA_valid=false;
}
}
else
{//3
EA_valid=" NO_EndMonth ";
IsEA_valid=false;
}
}
else
{//2
EA_valid=" NO_EndYear ";
IsEA_valid=false;
}
It will help you to set period of EA opening orders time in relation to testing/optimizing period time.
So, when EA open position, this position may not be closed before the end of the testing/optimizing period of time. There can be few days, weeks or even months needed to close that position.

Mac.
 
 
  • Post #9,925
  • Quote
  • Edited 2:44pm Mar 14, 2023 6:58am | Edited 2:44pm
  •  MacMG
  • | Joined Oct 2008 | Status: Another beginner | 339 Posts
4/ “Update;” EA code update informations.

#property copyright "Mac"
//----
extern string Broker_acc = " acc: ";
extern string UpDate = "UpDate: 20.02.2023. 8:40";
extern int iMagicN = 0;
extern int EndYear = 2023;
extern int EndMonth = 12;
extern int EndDay = 31;

Whenever you “Compile” any changes you need to make code update!!!

Mac.
 
 
  • Post #9,926
  • Quote
  • Mar 14, 2023 7:06am Mar 14, 2023 7:06am
  •  MacMG
  • | Joined Oct 2008 | Status: Another beginner | 339 Posts
To those trades still interesting to learn MQ4 coding, please enjoy.
Attached File(s)
File Type: pdf Andrew Young - Expert Advisor Programming Creating Automated Trading Systems in MQL for MetaTrader.p   1.3 MB | 46 downloads

Or even more.
https://www.traders-library.com/Free%20Download/

Good luck.
Mac.
 
 
  • Post #9,927
  • Quote
  • Mar 14, 2023 10:53am Mar 14, 2023 10:53am
  •  h1307
  • | Joined Feb 2023 | Status: Member | 7 Posts
Quoting MacMG
Disliked
{quote} Hi h1307. Can you rewrite, let's say OverNight v9 EA in MQL5 and share with us mq5 file? Just thinking! Mac.
Ignored
Hi MacMg, I tried to backtest OverNight on last years but it seems that it doesn't work anymore so I think there's no point in rewriting it into mql5.
 
 
  • Post #9,928
  • Quote
  • Mar 14, 2023 2:40pm Mar 14, 2023 2:40pm
  •  MacMG
  • | Joined Oct 2008 | Status: Another beginner | 339 Posts
Quoting h1307
Disliked
{quote} Hi MacMg, I tried to backtest OverNight on last years but it seems that it doesn't work anymore so I think there's no point in rewriting it into mql5.
Ignored
You need to use _2023 version.
OverNight_EAv9a_2023 post#9879 or 9884.
SimpleH1_GBPUSD_EAv9_2023 post#9885.
camvcvooV5_2023 post#9911,
or Tokyo_GBPUSD_v17a post#1.


Mac.
 
 
  • Post #9,929
  • Quote
  • Mar 23, 2023 5:59am Mar 23, 2023 5:59am
  •  h1307
  • | Joined Feb 2023 | Status: Member | 7 Posts
Quoting MacMG
Disliked
{quote} You need to use _2023 version. OverNight_EAv9a_2023 post#9879 or 9884. SimpleH1_GBPUSD_EAv9_2023 post#9885. camvcvooV5_2023 post#9911, or Tokyo_GBPUSD_v17a post#1. Mac.
Ignored
I tried the 2023 on GBPUSD , last year,IC MAarkets - M1 - H1. But bo significant profit
Attached Image (click to enlarge)
Click to Enlarge

Name: screenshot.png
Size: 17 KB
 
 
  • Post #9,930
  • Quote
  • Mar 24, 2023 8:43am Mar 24, 2023 8:43am
  •  MacMG
  • | Joined Oct 2008 | Status: Another beginner | 339 Posts
Quoting h1307
Disliked
{quote} I tried the 2023 on GBPUSD , last year,IC MAarkets - M1 - H1. But bo significant profit {image}
Ignored
Thanks for sharing test result.
Was this test for OverNight..EA?
What was your setting?
Any optimization parameters?
M15 or H1 is best timeframe.

Mac.
 
 
  • Post #9,931
  • Quote
  • Last Post: Mar 24, 2023 8:47am Mar 24, 2023 8:47am
  •  MacMG
  • | Joined Oct 2008 | Status: Another beginner | 339 Posts
Quoting h1307
Disliked
{quote} I tried the 2023 on GBPUSD , last year,IC MAarkets - M1 - H1. But bo significant profit {image}
Ignored
Well, what is significant profit for you?
Significant lot size make usually the rest.
Mac.
 
 
  • Trading Systems
  • /
  • Simple H1 GBPUSD EA
  • Reply to Thread
    • 1 492493494495496 Page 497
    • 1 496 Page 497
0 traders viewing now
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2023