Help importing custom studies

Ranothil

New member
Joined
Jun 23, 2019
Posts
2
Likes
0
I am trying to follow section 11.2 in the SDK user guide:
35

I am using Intellij Idea instead of Eclipse, but I believe the ant compilation worked correctly, as all class files were created in the expected directory. However, they are not available in the new studies dropdown within MotiveWave even after restarting the software.
38
39
I also tried manually importing the jar file, but none of the indicators were imported and there was no feedback from motivewave as to the success or failure of the operation. If you have any idea what I might be doing wrong, I would appreciate the help.
 

MotiveWave_Joe

Moderator
Staff member
Joined
Mar 26, 2019
Posts
223
Likes
67
Hi Ranothil,

Try closing MotiveWave, clearing your MotiveWave Extensions directory and run the ant script (deploy) again. I just tried it here with IntelliJ and it worked fine with the sample Eclipse project found under the support section of our website.

40
 

Ranothil

New member
Joined
Jun 23, 2019
Posts
2
Likes
0
Still no luck... is there a specific process for creating a jar file that can be imported? Are there any alternative import methods?
 

MotiveWave_Joe

Moderator
Staff member
Joined
Mar 26, 2019
Posts
223
Likes
67
Hi Ranothil,

There are two ways of importing a study into MotiveWave. The first way is to import the jar file via the Study > Add Study menu and the second way is by copying the jar file into the MotiveWave Extensions directory.

I have attached the examples.jar file as a .zip file. Clear your MotiveWave Extensions directory (including any subdirectories), restart MotiveWave and then import the attached jar file via the Study > Add Study menu. Just make sure you unzip the file first before importing.

I imported the jar file here and had no issues. You should see the Examples submenu once you have imported the file.
 

Attachments

  • examples.zip
    24.6 KB · Views: 107

wagyan

New member
Joined
Aug 25, 2019
Posts
4
Likes
0
Hi Joe,

I'm facing same issue.

Motivewave is unable to load or import custom studies .jar file even after restarting many times.

Any idea?

Thanks!
 

MotiveWave_Joe

Moderator
Staff member
Joined
Mar 26, 2019
Posts
223
Likes
67
Hi,

Have you tried importing the examples.jar file according to the instructions mentioned above? That should work. Try that first so that we can rule out the jar file as being the issue.

If you are still having issues, then please contact us directly at support@motivewave.com so that we can help you troubleshoot.

Thank you.
 

sunman

New member
Joined
Sep 13, 2019
Posts
3
Likes
3
I had a similar problem using Eclipse at first, it took a while to understand what the problem was. I could load a jar file that others had created easily by just restarting Motivewave, but my own studies would not load at all. I ended up checking my files using a small app called JD GUI (free app about 1.2 mb) and when that is ran, just drag and drop the new jar file on top of the app (or open through the menu) and examine the contents.
They must have a class file (one or more) inside or Motivewave will not recognise the study/strategy. My studies didn't have a class file inside! Turns out that the folder structure in the IDE was not correct and Eclipse was not compiling the class file to load into the jar file. All appeared to compile ok but they would not load because they were incomplete.
Also note that for a strategy to load and work, the jar file must include the study class that the strategy class is "overriding" or it will not work. I spent many days before I found these solutions but once sorted out it is much simpler to write and load studies and strategies. Hope this helps someone!
 

sas7085

Active member
Joined
Jul 7, 2020
Posts
33
Likes
7
Hi Ranothil,

There are two ways of importing a study into MotiveWave. The first way is to import the jar file via the Study > Add Study menu and the second way is by copying the jar file into the MotiveWave Extensions directory.

I have attached the examples.jar file as a .zip file. Clear your MotiveWave Extensions directory (including any subdirectories), restart MotiveWave and then import the attached jar file via the Study > Add Study menu. Just make sure you unzip the file first before importing.

I imported the jar file here and had no issues. You should see the Examples submenu once you have imported the file.

There is no Add Study Menu in the Study section. Adding jar to extension file is working .
 

MotiveWave_Joe

Moderator
Staff member
Joined
Mar 26, 2019
Posts
223
Likes
67
I had a similar problem using Eclipse at first, it took a while to understand what the problem was. I could load a jar file that others had created easily by just restarting Motivewave, but my own studies would not load at all. I ended up checking my files using a small app called JD GUI (free app about 1.2 mb) and when that is ran, just drag and drop the new jar file on top of the app (or open through the menu) and examine the contents.
They must have a class file (one or more) inside or Motivewave will not recognise the study/strategy. My studies didn't have a class file inside! Turns out that the folder structure in the IDE was not correct and Eclipse was not compiling the class file to load into the jar file. All appeared to compile ok but they would not load because they were incomplete.
Also note that for a strategy to load and work, the jar file must include the study class that the strategy class is "overriding" or it will not work. I spent many days before I found these solutions but once sorted out it is much simpler to write and load studies and strategies. Hope this helps someone!
Hi,

Thanks for the tip!
 

Adrian Valea

New member
Joined
Sep 12, 2020
Posts
3
Likes
2
try creating an ext folder under /MotiveExtensions. The jar is copied by builder into the lib folder. But it seems the ext folder must exist in order to load the custom studies.
 

stocks29

New member
Joined
May 15, 2021
Posts
2
Likes
0
Has anyone figured out how to have motivewave pickup the exploded class files rather than packaging a jar and importing it? It would be really nice for dev purposes to have the platform automatically detect and import changes during the dev/test cycle.

I'm able to import a jar file as described above. Not able to get deployed class files to be picked up automatically.
 

stocks29

New member
Joined
May 15, 2021
Posts
2
Likes
0
Has anyone figured out how to have motivewave pickup the exploded class files rather than packaging a jar and importing it? It would be really nice for dev purposes to have the platform automatically detect and import changes during the dev/test cycle.

I'm able to import a jar file as described above. Not able to get deployed class files to be picked up automatically.

Never mind, I figured out my issue. I was using a white labeled version of MotiveWave (called EdgeProX) and the extensions directory was different. After adjusting the property within Build.xml it worked perfectly! In my case:


Code:
  <property name="ext.dir" value="${user.home}/EdgeProX Extensions"/>
 
Top