New here - Eclipse and Examples provided by MotiveWave

Khaled

Member
Joined
Jul 31, 2023
Posts
12
Likes
4
I installed Eclipse and followed all the steps described in the last section of https://www.motivewave.com/sdk/MotiveWave_SDK_Programming_Guide.pdf but when I tried to Compile the few Studies shared on the website https://www.motivewave.com/sdk/MotiveWave_SDK_Programming_Guide.pdf it showed error messages

" /Users/Khaled/eclipse-workspace/MotWaveMACROSS1/MotiveWave Studies/src/study_examples/ATRChannel.java:3: error: cannot access DataContext
[javac] import com.motivewave.platform.sdk.common.DataContext;
[javac] ^
[javac] bad class file: /Users/Khaled/eclipse-workspace/MotWaveMACROSS1/MotiveWave Studies/lib/mwave_sdk.jar(/com/motivewave/platform/sdk/common/DataContext.class)
[javac] class file has wrong version 63.0, should be 61.0
[javac] Please remove or make sure it appears in the correct subdirectory of the classpath."

As shown on the attached screenshots.

I'm running MotiveWave 6.7.10 and Examples don't show under Study.

How can I overcome this please?
 

Attachments

  • Capture d’écran 2023-07-30 à 12.19.47.png
    Capture d’écran 2023-07-30 à 12.19.47.png
    1 MB · Views: 34

Shtick Hustler

Well-known member
Joined
Oct 15, 2020
Posts
106
Likes
46
You'd be better off posting this to an Eclipse, or Java dev forum. You have a mismatch between your Java versions that need to be brought in sync.

Also, if you'd rather start with Intellij Idea, here's a tutorial:
Idea tutorial
 

bart

Member
Joined
Jul 27, 2020
Posts
21
Likes
4
You'd be better off posting this to an Eclipse, or Java dev forum. You have a mismatch between your Java versions that need to be brought in sync.

Also, if you'd rather start with Intellij Idea, here's a tutorial:
Idea tutorial
Thank you for this! I was able to play around with this and get it to build with no errors but it did not import any of the example studies in motive wave. Where would I go to make a new study and test it?

I am new to this so sorry if this is a easy thing and I just missed it.
 

Shtick Hustler

Well-known member
Joined
Oct 15, 2020
Posts
106
Likes
46
I was able to play around with this and get it to build with no errors but it did not import any of the example studies in motive wave.

You have to deploy the class files to your /Motivewave Extensions/dev folder. Have you read through the MW SDK guide?
 

Shtick Hustler

Well-known member
Joined
Oct 15, 2020
Posts
106
Likes
46
Oops...missed that post 😊. Good work.

You mentioned in that thread that Java has a steep learning curve...true. Unfortunately, the MW SDK also has a steep learning curve 😠

NinjaTrader's NinjaScript and Think or Swim's ThinkScript are powerful scripting languages built on top of their respective SDKs. What takes 3 lines of code in NS/TS can take 10/20/30 or more in MW.

IMHO, MW is the dest-designed charting and trading app I've ever seen--which makes it worth struggling with it's rudimentary SDK. Though something like Sierra Chart probably has the most stable, bulletbroof trading engine, it is butt-ugly--like taking a time machine back to 1993, with a very Windows 3.1-esque interface (in other words--NO interface 😂), proving that great engineers don't necessarily make even mediocre designers.

It'd be awfully nice if MW devoted some more attention to the SDK--either adding a scripting language, or licensing some commercial software to package with MW (like, say, Trading Indicators Strategy Builder ;)). It would make novice coders very happy, and make MW a truly complete package.
 

jimlake

New member
Joined
Nov 10, 2023
Posts
1
Likes
0
Thank you for this! I was able to play around with this and get it to build with no errors but it did not import any of the example studies in motive wave. Where would I go to make a new study and test it?

I am new to this so sorry if this is a easy thing and I just missed it.
I am facing the same issue. How to resolve this?

/src/study_examples/ATRChannel.java:3: error: cannot access DataContext
import com.motivewave.platform.sdk.common.DataContext;
bad class file: /lib/mwave_sdk.jar(/com/motivewave/platform/sdk/common/DataContext.class)
class file has wrong version 63.0, should be 60.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
 

Spin

Well-known member
Joined
May 22, 2019
Posts
480
Likes
192
This means the JAVA-version you compile with is either to old, or the MW-SDK.jar too new.

You should select a newer JAVA-version (somewhere in the Eclipse Project Settings), or get your hands on an older MW-SDK.jar

This page might be helpful:
https://www.baeldung.com/java-find-class-version
 
Top