Hi Everyone,
I would like to see a strategy for unfinished auction at high and low the bar(Automate of Strategy). I have a code but it not working because the SDK doesn't have few functions. Please help guys.
The strategy that would like to open a position(trade lots) at unfinished auction at low for long entry with stop loss and trail the stop loss and same for unfinished auction at high for short entry with stop loss and trail the stop loss.
Below I have attached 2 codes. Please check.
Issues:
I have also seen the current code for unfinished auction is taking the trades at each bar even though there is a finished auction. Why would I need that ? I only need the unfinished auction at high and low of the bar and traded according to that using the strategy
The errors you are encountering are due to the methods getAskVolume and getBidVolume not being available on the DataSeries class in the MotiveWave SDK. It seems like these methods do not exist or are not exposed directly for accessing bid/ask volume for a given index.
You can still perform volume-based checks in MotiveWave, but the SDK does not directly provide bid and ask volume per bar through the DataSeries class.
Since bid and ask volume are not directly accessible in the way I suggested,
I would like to access bid/ask volumes. I would like to to use you can use the getAskVolume() and getBidVolume() methods for each bar in the DataSeries.
I would like to also trade Imbalance strategy and it is not working as well. Atttached the code
Errors:
Buildfile: /Users/saikiranananthula/eclipse/MotiveWave_Studies_example/MotiveWave Studies/build/build.xml
clean:
[delete] Deleting directory /Users/saikiranananthula/eclipse/MotiveWave_Studies_example/MotiveWave Studies/build/classes
compile:
[mkdir] Created dir: /Users/saikiranananthula/eclipse/MotiveWave_Studies_example/MotiveWave Studies/build/classes
[javac] Compiling 12 source files to /Users/saikiranananthula/eclipse/MotiveWave_Studies_example/MotiveWave Studies/build/classes
[javac] /Users/saikiranananthula/eclipse/MotiveWave_Studies_example/MotiveWave Studies/src/study_examples/VolumeImbalanceStrategy.java:9: error: cannot find symbol
[javac] import com.motivewave.platform.sdk.common.MAMethod; // Correct import for MAMethod
[javac] ^
[javac] symbol: class MAMethod
[javac] location: package com.motivewave.platform.sdk.common
[javac] /Users/saikiranananthula/eclipse/MotiveWave_Studies_example/MotiveWave Studies/src/study_examples/VolumeImbalanceStrategy.java:57: error: cannot find symbol
[javac] double avgVolume = series.ma(MAMethod.SMA, index, period, Enums.BarInput.VOLUME); // Correct usage of MAMethod
[javac] ^
[javac] symbol: variable MAMethod
[javac] location: class VolumeImbalanceStrategy
[javac] /Users/saikiranananthula/eclipse/MotiveWave_Studies_example/MotiveWave Studies/src/study_examples/VolumeImbalanceStrategy.java:83: error: cannot find symbol
[javac] double avgVolume = series.ma(MAMethod.SMA, ind, getSettings().getInteger(PERIOD), Enums.BarInput.VOLUME);
[javac] ^
[javac] symbol: variable MAMethod
[javac] location: class VolumeImbalanceStrategy
[javac] 3 errors
BUILD FAILED
/Users/saikiranananthula/eclipse/MotiveWave_Studies_example/MotiveWave Studies/build/build.xml:46: Compile failed; see the compiler error output for details.
Total time: 669 milliseconds
Instead I take the trade manually when I see it, rather I can build a strategy around it to buy and sell.
All I need is to automate it like MA cross strategy and now I need unfinished auction strategy - wrote a code but some issues with dataseries libraries.
I would like to see a strategy for unfinished auction at high and low the bar(Automate of Strategy). I have a code but it not working because the SDK doesn't have few functions. Please help guys.
The strategy that would like to open a position(trade lots) at unfinished auction at low for long entry with stop loss and trail the stop loss and same for unfinished auction at high for short entry with stop loss and trail the stop loss.
Below I have attached 2 codes. Please check.
Issues:
I have also seen the current code for unfinished auction is taking the trades at each bar even though there is a finished auction. Why would I need that ? I only need the unfinished auction at high and low of the bar and traded according to that using the strategy
The errors you are encountering are due to the methods getAskVolume and getBidVolume not being available on the DataSeries class in the MotiveWave SDK. It seems like these methods do not exist or are not exposed directly for accessing bid/ask volume for a given index.
You can still perform volume-based checks in MotiveWave, but the SDK does not directly provide bid and ask volume per bar through the DataSeries class.
Since bid and ask volume are not directly accessible in the way I suggested,
I would like to access bid/ask volumes. I would like to to use you can use the getAskVolume() and getBidVolume() methods for each bar in the DataSeries.
I would like to also trade Imbalance strategy and it is not working as well. Atttached the code
Errors:
Buildfile: /Users/saikiranananthula/eclipse/MotiveWave_Studies_example/MotiveWave Studies/build/build.xml
clean:
[delete] Deleting directory /Users/saikiranananthula/eclipse/MotiveWave_Studies_example/MotiveWave Studies/build/classes
compile:
[mkdir] Created dir: /Users/saikiranananthula/eclipse/MotiveWave_Studies_example/MotiveWave Studies/build/classes
[javac] Compiling 12 source files to /Users/saikiranananthula/eclipse/MotiveWave_Studies_example/MotiveWave Studies/build/classes
[javac] /Users/saikiranananthula/eclipse/MotiveWave_Studies_example/MotiveWave Studies/src/study_examples/VolumeImbalanceStrategy.java:9: error: cannot find symbol
[javac] import com.motivewave.platform.sdk.common.MAMethod; // Correct import for MAMethod
[javac] ^
[javac] symbol: class MAMethod
[javac] location: package com.motivewave.platform.sdk.common
[javac] /Users/saikiranananthula/eclipse/MotiveWave_Studies_example/MotiveWave Studies/src/study_examples/VolumeImbalanceStrategy.java:57: error: cannot find symbol
[javac] double avgVolume = series.ma(MAMethod.SMA, index, period, Enums.BarInput.VOLUME); // Correct usage of MAMethod
[javac] ^
[javac] symbol: variable MAMethod
[javac] location: class VolumeImbalanceStrategy
[javac] /Users/saikiranananthula/eclipse/MotiveWave_Studies_example/MotiveWave Studies/src/study_examples/VolumeImbalanceStrategy.java:83: error: cannot find symbol
[javac] double avgVolume = series.ma(MAMethod.SMA, ind, getSettings().getInteger(PERIOD), Enums.BarInput.VOLUME);
[javac] ^
[javac] symbol: variable MAMethod
[javac] location: class VolumeImbalanceStrategy
[javac] 3 errors
BUILD FAILED
/Users/saikiranananthula/eclipse/MotiveWave_Studies_example/MotiveWave Studies/build/build.xml:46: Compile failed; see the compiler error output for details.
Total time: 669 milliseconds
Instead I take the trade manually when I see it, rather I can build a strategy around it to buy and sell.
All I need is to automate it like MA cross strategy and now I need unfinished auction strategy - wrote a code but some issues with dataseries libraries.