Populate the current offers from TS into Excel using DDE

Strategies are published here.

Moderator: admin

Re: Populate the current offers from TS into Excel using DDE

Postby Victor.Tereschenko » Fri Mar 29, 2013 7:08 am

ddrrbb wrote:Is it possible to load historical prices into excel with this strategy? Right now, I manually load prices into excel at the end of the day.

This sample will write "yyyy-m-d.csv" file into the TS folder daily (not DDE is needed).
Attachments
Rate_log.lua
(3.22 KiB) Downloaded 1297 times
“There are only three sports: bullfighting, motor racing, and mountaineering; all the rest are merely games.” (c) Ernest Hemingway
Victor.Tereschenko
FXCodeBase: Confirmed User
 
Posts: 144
Joined: Fri Nov 19, 2010 8:55 am

Re: Populate the current offers from TS into Excel using DDE

Postby jsotor » Wed Jul 31, 2013 1:36 pm

To put data via DDE in excel, all you need is to enter the following formula into the excel cell:
=A|B!C
where
A is a service name
B is a topic
and
C is a value.


Is there a way to get values from marketscope charts?

At least it would be nice to get Open price.

topic.bid = dde_server:addValue(topic.id, "Bid");
topic.ask = dde_server:addValue(topic.id, "Ask");
topic.high = dde_server:addValue(topic.id, "High");
topic.low = dde_server:addValue(topic.id, "Low");
topic.pipcost = dde_server:addValue(topic.id, "PipCost");
topic.time = dde_server:addValue(topic.id, "Time");
-- topic.mmr = dde_server:addValue(topic.id, "MMR");


I've noticed that in dde_offers_adv.lua, the line that refers to "MMR" is commented. So it's not returning that value.

Question: Is ddeserver_lua.dll the same file or is it an updated version?

I ask this because dde_offers.lua returnes fewer values. (BID, ASK, TIME, DIGITS)

And dde_offers_adv.lua has more values.

If I add a line:
topic.time = dde_server:addValue(topic.id, "Open");
will it work?

I removed the -- coment in
-- topic.mmr = dde_server:addValue(topic.id, "MMR");
and it didn't work.


So are there other topics and values available, or we can only access the ones in dde_offers_adv.lua and in dde_accounts.lua?
jsotor
 
Posts: 32
Joined: Mon Nov 21, 2011 9:24 am

Re: Populate the current offers from TS into Excel using DDE

Postby davidfromkent » Fri May 16, 2014 9:16 am

I know it's an old thread but this has given me some brilliant information and resource - thank you!
It's great to be able to access live Account and Offers data directly in Excel.
The only thing I'm missing is the ability to get information from the TS2 Orders into Excel - can anyone help with that? My programming skills don't include the ability I'm afraid. :geek:
davidfromkent
 
Posts: 1
Joined: Fri May 16, 2014 8:51 am

Re: Populate the current offers from TS into Excel using DDE

Postby Alexey.Pechurin » Mon May 19, 2014 7:34 am

Hello, davidfromkent

Could you please explain what do you want to get in Excel for Orders? Using this technique you should define by yourself for each Excel cell which data it contains. Accounts and Offers have known ids and names but Orders are created and removed dynamically and we cannot add rows to Excel when a new Order is created.

Alexey
Alexey.Pechurin
 
Posts: 98
Joined: Sun Jul 22, 2012 11:26 pm

Re: Populate the current offers from TS into Excel using DDE

Postby congok » Tue Apr 14, 2015 10:05 am

Hi
I understand that this is an old threat...but this is NIZE.
I was just wondering how can the above be used to get OHLC for 5 min bars?
Can this be done and how...thanks
congok
 
Posts: 9
Joined: Mon Mar 09, 2015 7:05 pm

Re: Populate the current offers from TS into Excel using DDE

Postby Alexey.Pechurin » Wed Apr 15, 2015 1:47 am

Hi, congok

Sorry but I don't understand what do want to get. Do you want to get a file with m5 bars OHLC? Or do you want to use DDE somehow? Please clarify your needs.
Alexey.Pechurin
 
Posts: 98
Joined: Sun Jul 22, 2012 11:26 pm

Re: Populate the current offers from TS into Excel using DDE

Postby congok » Sun Apr 19, 2015 1:42 pm

What i would like to have is the following:
having excel printing OHLC every 5 min during live market...Maybe this might not be possible via DDE...not very familiar...or you may guide me how to record the data coming in and then getting the High and Low of the last 5 min...i hope this is clearer.
congok
 
Posts: 9
Joined: Mon Mar 09, 2015 7:05 pm

Re: Populate the current offers from TS into Excel using DDE

Postby Alexey.Pechurin » Tue May 05, 2015 9:28 am

Hi, congok

Sorry for delay. I missed your post. There are more questions.

1) Do you need to get a log of High/Low values of m5 bars in real time. Or do you need to see these values for the last (current) m5 bar only?

2) Do you need to update High/Low values when m5 bar is closed (High/Low of the last closed bar) or to update them dynamically when the current bar is not closed yet?

Alexey
Alexey.Pechurin
 
Posts: 98
Joined: Sun Jul 22, 2012 11:26 pm


Re: Populate the current offers from TS into Excel using DDE

Postby freirefx » Thu Dec 29, 2016 5:50 pm

Hello there guys, I'm having some trouble to connect DDE with FXCM Trading Station in Windows 10. Apparently the Trading Station do not serve the DDE. I have tried on Excel and .NET. Didn't get any answer.

do you guys know how to fix that?
my best regards
freirefx
 
Posts: 1
Joined: Thu Dec 29, 2016 5:46 pm

PreviousNext

Return to Custom Strategies

Who is online

Users browsing this forum: No registered users and 18 guests