davydai wrote:
1) Can i use the Strategy function in platform to call Jforex api, with an account size less than 100,000 USD?
There are no limitations for JForex API. Any Dukascopy account can use it for free with no limitations.
davydai wrote:
2) Does the Strategy written in java support c shared library by Java Native Interface?
A strategy can do whatever Java SE can do, hence, also use JNI or JNA. For instance (beforehand download the jna.jar file and put it in the respective directory):
@RequiresFullAccess
@Library("c:/temp/jna.jar")
public class StratMsgBoxJna implements IStrategy {
public interface User32 extends com.sun.jna.Library {
int MessageBoxA(int hwnd, String text, String caption, int flags);
public int GetSystemMetrics(int nIndex);
}
@Override
public void onStart(IContext context) throws JFException {
User32 user32 = (User32) Native.loadLibrary("user32", User32.class);
user32.MessageBoxA(0, "Hello JForex Strategy", "Test string from JForex Strategy", 1);
context.getConsole().getOut().println("Screen resolution: " + user32.GetSystemMetrics(1) + " x " + user32.GetSystemMetrics(0));
}