Go Back   DailyFX Forex Forum | FX Forum > FXCM Products and Services > FXProgrammers > Discussion / Support Forum > Indicator SDK Support

Reply
 
Thread Tools Rate Thread
  #1 (permalink)  
Old 10-20-2009, 10:07 PM
Registered User
 
Join Date: Mar 2009
Posts: 1
jfitz1959 is an unknown quantity at this point
Is there a 'c' interface available?

Can one call 'c' functions from the indicator sdk lua implementation?
Reply With Quote
  #2 (permalink)  
Old 10-21-2009, 12:05 PM
Member
 
Join Date: Oct 2008
Posts: 609
Nikolay.Gekht is on a distinguished road
Yes.

The best way is to write C wrapper around your function to provide the lua interface and attach the required function as a lua extension module.

The other way is to use P/Invoke extension library for the LUA LuaForge: Lua Invoke: Project Info

To get access to a lua extension module:
1) Put your extension module into the lua_ext subfolder of the Indicore SDK and Marketscope folder.
2) Add the following code to the prepare() function of your indicator:
Code:
package.cpath = package.cpath .. ";" ..  core.app_path() .. "\\lua_ext\\?.dll"
require("yourmodule");
I'll prepare an example of using P/Invoke in a few days.
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Disclaimer: Trading foreign exchange on margin carries a high level of risk, and may not be suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to trade foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with foreign exchange trading, and seek advice from an independent financial advisor if you have any doubts. Any opinions, news, research, analyses, prices, or other information contained on this website is provided as general market commentary and does not constitute investment advice. Forex Capital Markets LLC. will not accept liability for any loss or damage, including without limitation to, any loss of profit, which may arise directly or indirectly from use of or reliance on such information.

All times are GMT -5. The time now is 08:59 AM.
Copyright ©2009 Daily FX. All Rights Reserved.