Display Trading History on a Chart

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

Moderator: admin

Re: Display Trading History on a Chart

Postby Gentle » Thu Feb 02, 2017 4:37 am

I have exactly the same error as Mountaintrader. That error with output folder empty.
I don't have the error with expat.
So possibly there two problems here.

If anyone got these and discovered a solution, please give a sign here.
User avatar
Gentle
 
Posts: 13
Joined: Thu Feb 02, 2017 4:22 am

Re: Display Trading History on a Chart

Postby robocod » Fri Feb 03, 2017 10:55 am

It seems that the URL generated by the core.host:execute("getTradingProperty", "ReportURL", nil, account) is not generating the report as expected (so the expat parser fails). It seems to be loading a new webpage which then requires a further submission.

Currently debugging this.
User avatar
robocod
FXCodeBase: Graduate
 
Posts: 298
Joined: Thu May 10, 2012 4:25 pm

Re: Display Trading History on a Chart

Postby robocod » Mon Feb 06, 2017 8:47 am

robocod wrote:It seems that the URL generated by the core.host:execute("getTradingProperty", "ReportURL", nil, account) is not generating the report as expected (so the expat parser fails). It seems to be loading a new webpage which then requires a further submission.

Currently debugging this.


It requires a "&report_name=REPORT_NAME_STATEMENT_SUMMARY" appended to the URL used to generate the report. Then it works. (This is with the TradingHistory.lua indicator).
User avatar
robocod
FXCodeBase: Graduate
 
Posts: 298
Joined: Thu May 10, 2012 4:25 pm

Re: Display Trading History on a Chart

Postby Alexander.Gettinger » Mon Feb 06, 2017 2:02 pm

Mountaintrader wrote:Ok I just cant open the file LuaLib in FXST2... would appreciate any suggestion.

Please see attached


Please, try to reinstall the Trading Station.
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Re: Display Trading History on a Chart

Postby Bda001 » Wed Feb 08, 2017 11:40 am

robocod wrote:
robocod wrote:It seems that the URL generated by the core.host:execute("getTradingProperty", "ReportURL", nil, account) is not generating the report as expected (so the expat parser fails). It seems to be loading a new webpage which then requires a further submission.

Currently debugging this.


It requires a "&report_name=REPORT_NAME_STATEMENT_SUMMARY" appended to the URL used to generate the report. Then it works. (This is with the TradingHistory.lua indicator).



Thanks robocod,
but can you more specific? can you give us a line number and how to rewrite it?
Bda001
 
Posts: 3
Joined: Tue Apr 28, 2015 2:28 pm

Re: Display Trading History on a Chart

Postby robocod » Sun Feb 12, 2017 12:01 pm

Bda001 wrote:
robocod wrote:
robocod wrote:It seems that the URL generated by the core.host:execute("getTradingProperty", "ReportURL", nil, account) is not generating the report as expected (so the expat parser fails). It seems to be loading a new webpage which then requires a further submission.

Currently debugging this.


It requires a "&report_name=REPORT_NAME_STATEMENT_SUMMARY" appended to the URL used to generate the report. Then it works. (This is with the TradingHistory.lua indicator).



Thanks robocod,
but can you more specific? can you give us a line number and how to rewrite it?


Here it is (attached). Sorry, for not posting it before, but I wasn't sure if I had the up-to-date version since I'd pulled it from an old PC some time ago.

TradingHistory.lua
(22.26 KiB) Downloaded 827 times
User avatar
robocod
FXCodeBase: Graduate
 
Posts: 298
Joined: Thu May 10, 2012 4:25 pm

Re: Display Trading History on a Chart

Postby lwiart » Tue Feb 21, 2017 8:05 pm

Hi guys,

I had the same issues than most of you, guys. Reading the posts helped, but there were missing steps.
So I thought it would help the community to summarize here the steps:
1- Have FXCM Trading Station / Marketscope installed
2- Download the file LuaLib: http://fxcodebase.com/code/download/file.php?id=9231 (originaly in Post http://fxcodebase.com/code/viewtopic.php?f=28&t=9753&p=20771#p20771
3- If when you launch it you get an error "Error opening file for writing: \LuaLib\commons.lua", go to your hardrive c:\ and create the directory C:\LuaLib, then launch it again. Now it should work fine
4- Now, go to your Trading Station directory. By default, it is C:\Program Files (x86)\Candleworks\FXTS2
5- Create a directory "lua" there
6- Move the LuaLib directory in this "lua" directory. You should now have the directory C:\Program Files (x86)\Candleworks\FXTS2\lua\LuaLib, with 3 files there: commons.lua, reportapi.lua, and reportcache.lua
7- Open Marketscope
8- Install the TradingHistory.lua attached to my post (it has the parameter "&report_name=REPORT_NAME_STATEMENT_SUMMARY" on line 110, as recommended by robocod). To install it: drag the TradingHistory.lua file into the Marketscope window
9- Add it to your chart --> it will display the trading history :)
Attachments
TradingHistory.lua
(22.25 KiB) Downloaded 877 times
lwiart
 
Posts: 3
Joined: Tue Feb 21, 2017 7:47 pm

Re: Display Trading History on a Chart

Postby andyforex2016 » Thu Sep 28, 2017 8:00 am

I was successfully able to install the trading history indicator by following the steps outlined by lwiart . However, my charts are not showing trade history. Can somebody pls help.
andyforex2016
 
Posts: 1
Joined: Thu Sep 28, 2017 7:52 am

Re: Display Trading History on a Chart

Postby lwiart » Fri Sep 29, 2017 5:44 am

Hi andyforex,

Unfortunately, I noticed that as well...
I think that something changed in the FXCM API and I (or somebody else) need to dig deeper to find out how the call to FXCM API has changed.

I'll try to do that in the next few days, and if I find the answer/change to bring to the lua code, I'll post the new code here.
lwiart
 
Posts: 3
Joined: Tue Feb 21, 2017 7:47 pm

Re: Display Trading History on a Chart

Postby lwiart » Sun Oct 01, 2017 5:16 pm

So, I did some testing this week-end and realized that the URL doesn't work anymore:
when the URL call getreport.app is made (URL: https://fxpa.fxcorporate.com/fxpa/getre ... 09/29/2017)
The message returned is :
"Database error. Please contact application technical support."

I contacted FXCM support to have some feedback on that (temporary problem? change in the way the getreport.app must be called?).

I will keep you posted and will post the new code if it is about a change that has to be made in the indicator code.
lwiart
 
Posts: 3
Joined: Tue Feb 21, 2017 7:47 pm

PreviousNext

Return to Custom Indicators

Who is online

Users browsing this forum: No registered users and 48 guests