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

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Can I execute trades via buy/sell button with an EA? 0 replies

Using one EA to execute with two mt4 brokers 7 replies

Do you execute trades in MT4 or in broker platforms? 0 replies

How to display MT4 account trades to remote users? 14 replies

EA wont execute trades! just alerts... 5 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 8
Attachments: Execute remote MT4 trades via Twitter
Exit Attachments
Tags: Execute remote MT4 trades via Twitter
Cancel

Execute remote MT4 trades via Twitter

  • Last Post
  •  
  • Page 1 2
  • Page 1 2
  •  
  • Post #1
  • Quote
  • First Post: Jun 10, 2010 7:14am Jun 10, 2010 7:14am
  •  StephanusR
  • | Joined Jul 2009 | Status: Member | 322 Posts
Isn't there some python script out there that will read a twitter feed , write to a text file so that MT4 can execute the trade. One could trade in real-time for many people like this.
  • Post #2
  • Quote
  • Jun 12, 2010 7:20pm Jun 12, 2010 7:20pm
  •  yohan_ip
  • | Joined Sep 2006 | Status: Cubeian | 112 Posts
hmm, interesting
a custom software perhaps.. i could help you with that
-1128 Pips since 6 August 2007
 
 
  • Post #3
  • Quote
  • Jun 13, 2010 4:33pm Jun 13, 2010 4:33pm
  •  StephanusR
  • | Joined Jul 2009 | Status: Member | 322 Posts
Quoting thepipking
Disliked
I have not heard of one, and do a lot of trading using Metatrader, would be interested if you find one though. Have found most people on twitter that talk Fx are just affiliates of some system so be careful what you are following
Ignored
MT5 will have this functionality with a direct interface to ICQ. You could then have say 200 subscribers receiving your signal from your ICQ client to their MT5 terminal mirroring your trades in real-time and quicker than the many signal providers services out there.
 
 
  • Post #4
  • Quote
  • Jun 13, 2010 8:00pm Jun 13, 2010 8:00pm
  •  krakoukas
  • | Joined Oct 2009 | Status: Deer in the headlights | 41 Posts
From a security standpoint, that's a rather terrifying idea.

If you insist on using a public low-security platform for broadcasting automated trading orders tied to live accounts (which is a Bad Idea (tm)), at the very least make sure you use the SSL version of the twitter APIs from end to end (and that you verify the SSL certs against the root CAs.)

You'll still be putting way too much trust in twitter's ability to protect the integrity of your messages, along with its ability to deliver those messages in a timely fashion, but at least you'll minimize the odds of someone hijacking your traffic for fun and profit.
How did this get here oh god I am not good with computer.
 
 
  • Post #5
  • Quote
  • Jun 14, 2010 12:36am Jun 14, 2010 12:36am
  •  beckhamis619
  • | Joined Dec 2009 | Status: Member | 10 Posts
Quoting krakoukas
Disliked
From a security standpoint, that's a rather terrifying idea.

If you insist on using a public low-security platform for broadcasting automated trading orders tied to live accounts (which is a Bad Idea (tm)), at the very least make sure you use the SSL version of the twitter APIs from end to end (and that you verify the SSL certs against the root CAs.)

You'll still be putting way too much trust in twitter's ability to protect the integrity of your messages, along with its ability to deliver those messages in a timely fashion, but at least you'll...
Ignored
Is SSL encryption really required to secure the medium of communication for a tweet? At the end of it, the order will still be seen by his followers / public.

His main focus appears to be broadcasting his message in an efficient manner, and tweets seem like a cheap/viable option, with the occasional delay / fail-whale syndrome.

I would worry more about the tweets being re-tweeted, or decoded first by one of his followers and re-tweeted to the mass public.

Stephanusr,

I'd suggest taking a look at the winsock dll api in windows, it shouldn't be too difficult to write an EA to connect to a twitter user's api/json page, check it against the open Orders table and open new trades every 5-10 seconds, all within a single EA.
 
 
  • Post #6
  • Quote
  • Jun 14, 2010 2:20am Jun 14, 2010 2:20am
  •  StephanusR
  • | Joined Jul 2009 | Status: Member | 322 Posts
Quoting beckhamis619
Disliked
Is SSL encryption really required to secure the medium of communication for a tweet? At the end of it, the order will still be seen by his followers / public.

His main focus appears to be broadcasting his message in an efficient manner, and tweets seem like a cheap/viable option, with the occasional delay / fail-whale syndrome.

I would worry more about the tweets being re-tweeted, or decoded first by one of his followers and re-tweeted to the mass public.

Stephanusr,

I'd suggest taking a look at the winsock dll api in windows, it shouldn't...
Ignored
The Twitter usage is but one way, there is a slight delay but with eurusd it does't matter that much if the signal comes in 5 sec late, for those wishing to test the signals out first. At the same time the signal is sent via an IRC client.

My main issue is the way MT4 reads text files and the file locks one gets with MT4 checking it once a second. Using a DLL winsock would be great if only one could find a programmer willing to do it. I contacted a commercial EA writer who hasn't yet returned or indicated how this could be technically feasible.
 
 
  • Post #7
  • Quote
  • Jun 17, 2010 11:59am Jun 17, 2010 11:59am
  •  StephanusR
  • | Joined Jul 2009 | Status: Member | 322 Posts
Somewhere http://articles.mql4.com/search/mt5/2 read an article on ICQ and MT5. There are lets say 200 clients running MT5. A signal provider communicates with these 200 pc's via an IRC app. The IRC app takes the trade signal, converts to Oscar protocol on the client PC and executes the trade in MT5 on the client PC. Thus we can finally bypass the many third party signal middlemen out there and allow a signal provider to trade directly on your pc with a 1sec delay. IF only MT5 would be released.

Same with twitter, scan the twitter feed convert the real-time trade signal into Oscar ICQ protocol on your pc via Python, Ruby and interface with the ICQ embedded app on your MT5 program.

Multiple means of getting a trade signal out would be possible. One could for example poll a web page or monitor many IRC chat sessions with a specific trader giving his signals in via some defined protocol:
tr.24 $EURUSD long 30 30 would mean long euro at market TP 30, ST 30 etc.
 
 
  • Post #8
  • Quote
  • Jun 18, 2010 2:52pm Jun 18, 2010 2:52pm
  •  StephanusR
  • | Joined Jul 2009 | Status: Member | 322 Posts
Quoting StephanusR
Disliked
Somewhere http://articles.mql4.com/search/mt5/2 read an article on ICQ and MT5. There are lets say 200 clients running MT5. A signal provider communicates with these 200 pc's via an IRC app. The IRC app takes the trade signal, converts to Oscar protocol on the client PC...
Ignored
Found the article I couldn't find: http://www.mql5.com/en/articles/64

"..ICQ is a centralized service of instant exchange of text messages, with an offline mode, which uses the OSCAR protocol. For a trader, ICQ can serve as a terminal, which displays timely information, as well as a control panel. This article will demonstrate an example of how to implement an ICQ client, with a minimum set of functions, within an Expert Advisor.

The draft of the IcqMod project, containing an open original code, was used and processed as a basis for the article. Protocol of exchange with the ICQ server is implemented in the DLL module icq_mql5.dll. It is written in C++ and makes uses the only Windows library winsock2. A compiled modules and a source code for Visual Studio 2005 are attached to this article.
 
 
  • Post #9
  • Quote
  • May 27, 2011 2:25pm May 27, 2011 2:25pm
  •  erforex
  • | Commercial Member | Joined May 2011 | 152 Posts
We have coded expert advisor with dll. This EA can post all your orders with SL and TP from Metatrader 4 to your Twitter with delay about 1 sec. (you can increase delay) , you also can post profit with with a given frequency ( 1 time per week for example). I can attach this EA for free. I need just couple days for description. Because first step - you should generate api key for connection with your twitter account.


Is it interesting?
 
 
  • Post #10
  • Quote
  • Edited May 28, 2011 1:20pm May 27, 2011 2:54pm | Edited May 28, 2011 1:20pm
  •  erforex
  • | Commercial Member | Joined May 2011 | 152 Posts
Description.

http://www.forexfactory.com/attachme...1&d=1306603181

1) Open file run.bat with any text editor

2) In the first line type your real Twitter username (not e-mail) and password instead of "UserName" and "Password" accordingly

3) Apply changes and close the file

4) Double click on run.bat and follow the instructions.

5) Visit the link for authorization of application(this link will be also created in file auth_link.txt). By following the link you will get the pin provided by twitter.

6) Enter pin from twitter to the application. You will get 2 files(not zero sized!) in the current directory: twitterClient_token_key.txt and twitterClient_token_secret.txt. Copy them to the "expertsfiles" folder of your's Metatrader terminal.

7) Copy libcurl.dll to the System32 library

8) Copy post_to_twitter.dll to the "expertslibraries" folder of your's Metatrader terminal.

9) Copy TwitterSignalizer.mq4 to the "experts" folder of your's Metatrader terminal.

10) Put the expert TwitterSignalizer to any chart.


TimeIntervalForStatusUpdate =10 variable stores time in seconds for order events checking and twitter status update.

When you want to post information about profit from your MT4 account:
DayToTwittProfit=5;
HourToTwittProfit=18;
MinuteToTwittProfit=00;

Feel free to post any questions, comments and recommendations.
Attached Image
Attached File(s)
File Type: zip Twitter-Sinnals.zip   248 KB | 683 downloads
 
 
  • Post #11
  • Quote
  • Jun 2, 2011 10:42pm Jun 2, 2011 10:42pm
  •  erforex
  • | Commercial Member | Joined May 2011 | 152 Posts
One more Free Expert Advisor “e-BJF-TradeByHours”


1.Conception

Open market Buy at X1 hours, close market Buy at X2 hours
Open market Sell at Y1 hours, close market Sell at Y2 hours
Orders closed on StopLoss, TakeProfit, at close hour

2.Options


extern string _tmp1_ = " --- Trade params ---";
extern int AccDigits = 5;
// set 4 or 5
// 4 is required for old accounts with 4 digits on EURUSD pairs
// 5 is required for current accounts with 5 digits on EURUSD pairs
// do not set 2 or 3 for USDJPY pairs. Set 4 or 5

extern bool SupportECN = false;
// set true for ECN brokers
// true means that sl and tp will be added
// to the order only after open

extern bool AllowLongs = true; // set true to allow long orders
extern bool AllowShorts = true; // set true to allow short orders
extern double Lots = 0.1; // lots volume
extern int StopLoss = 100;
// StopLoss, pips
// Set 0 to trade without StopLoss

extern int TakeProfit = 100;
// TakeProfit, pips
// Set 0 to trade without TakeProfit

extern int Slippage = 3; // max. allowed slippage value, pips
extern int Magic = 20110515; // unique orders ID


extern string _tmp2_ = " --- Trade hours ---";
extern int Buy.Open.hr = 0; // buy open hour (by server time)

extern int Buy.Close.hr = 19; // buy close hour (by server time)
extern int Sell.Open.hr = 0; // sell open hour (by server time)
extern int Sell.Close.hr = 19; // sell close hour (by server time)

http://www.forexfactory.com/attachme...5&d=1307068816

Download backtest
Attached Image (click to enlarge)
Click to Enlarge

Name: e-BJF-TradeByHours_EURUSD_H1.gif
Size: 6 KB
Attached File(s)
File Type: mq4 e-BJF-TradeByHours.mq4   10 KB | 423 downloads
File Type: zip backtest.zip   21 KB | 388 downloads
 
 
  • Post #12
  • Quote
  • Jun 6, 2011 12:04pm Jun 6, 2011 12:04pm
  •  erforex
  • | Commercial Member | Joined May 2011 | 152 Posts
FREE Metatrader Expert Advisor 3 EMA Conception

Buy if (FastMA above SlowMA) and (FastMA above SlowMA2) and (SlowMA above SlowMA2)
Sell if (FastMA below SlowMA) and (FastMA below SlowMA2) and (SlowMA below SlowMA2)
Close orders on SL, TP, reversed signal

FREE Metatrader Expert Advisor 3 EMA Options


extern string _tmp1_ = " --- Trade params ---";
extern int AccDigits = 5;
// set 5 for all pairs if you have 5 digits after decimal
// point on EURUSD pair (1.34217 etc.)
// set 4 for all pairs if you have 4 digits after decimal
// point on EURUSD pair (1.3423 etc.)
extern bool MarketExecution = false; // set true for ECN brokers
// true means that sl and tp will be added only after order open
extern double Lot = 0.1; // lots volume
extern int StopLoss = 250; // StopLoss is 100 pips
// 0 is the same as no StopLoss
extern int TakeProfit = 100; // TakeProfit is 100 pips
// 0 is the same as no TakeProfit
extern int Slippage = 3; // max. permissible slippage value, pips
extern int Magic = 20110122; // unique orders ID
extern string _tmp2_ = " --- MAs ---";
extern bool MA.TradeOpenBar = false;
// true: get MA signals from open bar
// false: get MA signals from closed bar
extern int FastMA.Period = 20;
extern int FastMA.ma_shift = 0;
extern int FastMA.ma_method = MODE_EMA;
extern int FastMA.applied_price = PRICE_CLOSE;
// FastMA options
extern int SlowMA.Period = 50;
extern int SlowMA.ma_shift = 0;
extern int SlowMA.ma_method = MODE_EMA;
extern int SlowMA.applied_price = PRICE_CLOSE;
// SlowMA options
extern int SlowMA2.Period = 100;
extern int SlowMA2.ma_shift = 0;
Attached File(s)
File Type: mq4 e-BJF-3MA.mq4   11 KB | 406 downloads
 
 
  • Post #13
  • Quote
  • Jun 8, 2011 12:36am Jun 8, 2011 12:36am
  •  medical2009
  • | Joined Jan 2009 | Status: Member | 13 Posts
Quoting StephanusR
Disliked
Isn't there some python script out there that will read a twitter feed , write to a text file so that MT4 can execute the trade. One could trade in real-time for many people like this.
Ignored
Hi,

I have a package of scripts that can handle that issue. But there is an delay of around 10-20 seconds between reading the message at Twitter and place it on the MT4.
So it might not work for any scalping-activities. But for everything else, it works fine. I use it for copying trades from email-signal-providers.

I will go to my holidays today evening for 14 days, so I will not be able to answer for the next 2 weeks. Anybody who is interested can send me an PM, I will answer imediately if I'm back here...

Swen
 
 
  • Post #14
  • Quote
  • Jun 14, 2011 11:24pm Jun 14, 2011 11:24pm
  •  erforex
  • | Commercial Member | Joined May 2011 | 152 Posts
Free Expert Advisor e-BJF-PSAR


Conception:
Market Buy if PSAR reversed and appeared below the market
Market Sell if PSAR reversed and appeared above the market
Close orders on StopLoss, TakeProfit, reversed signal

Options:
extern string _tmp1_ = " --- Trade params ---";
extern int AccDigits = 5;
// set 5 for all pairs if you have 5 digits after decimal
// point on EURUSD pair (1.34217 etc.)
// set 4 for all pairs if you have 4 digits after decimal
// point on EURUSD pair (1.3423 etc.)
extern bool SupportECN = false;
// set true for ECN brokers
// true means that sl and tp will be added only after an order open
extern bool AllowLongs = true;
// set true to allow long orders
extern bool AllowShorts = true;
// set true to allow short orders
extern double Lot = 0.1; // lots volume
extern int StopLoss = 100; // StopLoss is 100 pips
// 0 is the same as no StopLoss
extern int TakeProfit = 100;
// TakeProfit is 100 pips
// 0 is the same as no TakeProfit
extern bool ReverseSignals = false;
// swap Buy and Sell signals true/false
extern int Slippage = 3;
// max. permissible slippage value, pips
extern int Magic = 20110422; // unique orders ID
extern string _tmp2_ = " --- Parabolic SAR ---";
extern double PSAR.step = 0.02;
extern double PSAR.maximum = 0.2;
// Parabolic SAR options
extern int PSAR.SignalBar = 0;
// 0: get PSAR signals from open bar
// 1: get PSAR signals from closed bar
Attached Image (click to enlarge)
Click to Enlarge

Name: e-BJF-PSAR_EURUSD_H1.gif
Size: 7 KB
Attached File(s)
File Type: mq4 e-BJF-PSAR.mq4   10 KB | 326 downloads
 
 
  • Post #15
  • Quote
  • Edited 2:24am Jul 28, 2011 1:15am | Edited 2:24am
  •  golady9
  • | Joined Oct 2009 | Status: Member | 18 Posts
Quoting erforex
Disliked
FREE Metatrader Expert Advisor 3 EMA Conception

Buy if (FastMA above SlowMA) and (FastMA above SlowMA2) and (SlowMA above SlowMA2)
Sell if (FastMA below SlowMA) and (FastMA below SlowMA2) and (SlowMA below SlowMA2)
Close orders on SL, TP, reversed signal

FREE Metatrader Expert Advisor 3 EMA Options


extern string _tmp1_ = " --- Trade params ---";
extern int AccDigits = 5;
// set 5 for all pairs if you have 5 digits after decimal
// point on EURUSD pair (1.34217 etc.)
// set 4 for all pairs...
Ignored
Thank you for submitting e-BJF-3MA.mq4

Please state what is the value for SMA, if we want to change EMA to SMA?

What is MA TradeOpenBar ?

If TP & SL set to 0, so it will exit at reverse crossover ?

How to exit (when we BUY) if SlowMA BELOW SlowMA2 ???

Is there any Trailing Stop we can use?

AND


Anyone has EA on 4 EMA / SMA crossover ??

thanks in advance
 
 
  • Post #16
  • Quote
  • Jul 29, 2011 10:17am Jul 29, 2011 10:17am
  •  erforex
  • | Commercial Member | Joined May 2011 | 152 Posts
Quoting golady9
Disliked
Thank you for submitting e-BJF-3MA.mq4

Please state what is the value for SMA, if we want to change EMA to SMA?

What is MA TradeOpenBar ?

If TP & SL set to 0, so it will exit at reverse crossover ?

How to exit (when we BUY) if SlowMA BELOW SlowMA2 ???

Is there any Trailing Stop we can use?

AND


Anyone has EA on 4 EMA / SMA crossover ??

thanks in advance
Ignored
>>Please state what is the value for SMA, if we want to change EMA to SMA?
See FastMA.ma_method, SlowMA.ma_method, SlowMA2.ma_method external parameters.

>>What is MA TradeOpenBar ?
MA.TradeOpenBar = true: get MA values from open bar
MA.TradeOpenBar = false: get MA values from closed bar

>>If TP & SL set to 0, so it will exit at reverse crossover ?
It will exit on opposite signal

>>How to exit (when we BUY) if SlowMA BELOW SlowMA2 ???
You can request for update to code new exit condition

>>Is there any Trailing Stop we can use?
You can request for update to add the trailing

AND

>>Anyone has EA on 4 EMA / SMA crossover ??
This can be dine by personal request
 
 
  • Post #17
  • Quote
  • Jul 30, 2011 10:59am Jul 30, 2011 10:59am
  •  golady9
  • | Joined Oct 2009 | Status: Member | 18 Posts
>>Please state what is the value for SMA, if we want to change EMA to SMA?
See FastMA.ma_method, SlowMA.ma_method, SlowMA2.ma_method external parameters.

Thank you for replying.

is 0 for SMA, 1 for EMA ???
 
 
  • Post #18
  • Quote
  • Jul 30, 2011 11:02am Jul 30, 2011 11:02am
  •  golady9
  • | Joined Oct 2009 | Status: Member | 18 Posts
Quoting erforex
Disliked
FREE Metatrader Expert Advisor 3 EMA Conception

Buy if (FastMA above SlowMA) and (FastMA above SlowMA2) and (SlowMA above SlowMA2)
Sell if (FastMA below SlowMA) and (FastMA below SlowMA2) and (SlowMA below SlowMA2)
Close orders on SL, TP, reversed signal

FREE Metatrader Expert Advisor 3 EMA Options


extern string _tmp1_ = " --- Trade params ---";
extern int AccDigits = 5;
// set 5 for all pairs if you have 5 digits after decimal
// point on EURUSD pair (1.34217 etc.)
// set 4 for all pairs...
Ignored
Hi
Anyone can code to add new exit condition
(when we BUY) when SlowMA BELOW SlowMA2

& add Trailing Stop?

Many thanks.
 
 
  • Post #19
  • Quote
  • Jul 30, 2011 9:50pm Jul 30, 2011 9:50pm
  •  erforex
  • | Commercial Member | Joined May 2011 | 152 Posts
Quoting golady9
Disliked
>>Please state what is the value for SMA, if we want to change EMA to SMA?
See FastMA.ma_method, SlowMA.ma_method, SlowMA2.ma_method external parameters.

Thank you for replying.

is 0 for SMA, 1 for EMA ???
Ignored
MODE_SMA 0 Simple moving average,
MODE_EMA 1 Exponential moving average,
MODE_SMMA 2 Smoothed moving average,
MODE_LWMA 3 Linear weighted moving average.
 
 
  • Post #20
  • Quote
  • Jul 30, 2011 9:51pm Jul 30, 2011 9:51pm
  •  erforex
  • | Commercial Member | Joined May 2011 | 152 Posts
Quoting golady9
Disliked
Hi
Anyone can code to add new exit condition
(when we BUY) when SlowMA BELOW SlowMA2

& add Trailing Stop?

Many thanks.
Ignored
You can pm me.
 
 
  • Platform Tech
  • /
  • Execute remote MT4 trades via Twitter
  • Reply to Thread
    • Page 1 2
    • Page 1 2
0 traders viewing now
  • More
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