Feature Request: A More User-friendly Buy/Sell Solution Integration for MultiCharts ( Indicator Included )

Questions about MultiCharts .NET and user contributed studies.
User avatar
Jobauma
Posts: 100
Joined: 16 Apr 2013
Has thanked: 22 times
Been thanked: 4 times

Feature Request: A More User-friendly Buy/Sell Solution Integration for MultiCharts ( Indicator Included )

Postby Jobauma » 30 Nov 2018

Hi.

I've made an indicator that works well with simulated trading. It has some bugs to it, and unfortunately I couldn't make it to work with live data. I only works on close ( " Bars.Status == EBarState.Close " ).

The indicator has regional descriptions everywhere, so it's easy to understand what I've been thinking. I'm hoping that somebody can make it better. :)

The levels are created with plots ( instead of TrendLines ), so it is possible to take the indicator behind price bars. There is trendlines on the last bar for ongoing positions ("Bars.LastBarOnChart"), with extension to the right, to see the position more clearly. These disappear when the position stops.

The ToolBar has some loading bugs to it, and the buttons doesn't work all the time. If you click "Buy" or "Sell", remember that you'll have to wait for the bar to close before the position executes. But fortunately I've integrated something that is called "Setback", so you can choose where the position starts at historical data ( then there will be created a line named " Actual Start " ).



Best regards,
Johannes Hillestad Baumann
Attachments
Jobauma BuySell.pln.zip
(5.99 KiB) Downloaded 28 times
Jobauma BuySell.png
Jobauma BuySell.png (403.37 KiB) Viewed 472 times

User avatar
Jobauma
Posts: 100
Joined: 16 Apr 2013
Has thanked: 22 times
Been thanked: 4 times

Re: Feature Request: A More User-friendly Buy/Sell Solution Integration for MultiCharts ( Indicator Included )

Postby Jobauma » 07 Dec 2018

I have come to the conclusion that the loading issues with the ToolBar are perhaps because I use VMware Fusion 11 to run Windows 10 Home. So for most of you there are probably no issues there. :) Maybe this is linked to the cause of the buttons not executing orders all the time either.

I hope that someone can make the indicator to work with live movement, besides just close to make something happen with the indicator.



Best regards,
Johannes Hillestad Baumann

User avatar
Jobauma
Posts: 100
Joined: 16 Apr 2013
Has thanked: 22 times
Been thanked: 4 times

Re: Feature Request: A More User-friendly Buy/Sell Solution Integration for MultiCharts ( Indicator Included )

Postby Jobauma » 17 Dec 2018

Hi.

I have cleaned up the code a bit, so it's easier to see what I've been thinking. In theory the code should work with live data, but it doesn't work, for some reason. My theory is that "m_CalculatePosition_Finished" is automatically set to "true" on live data ( when there is no line in the code that sets it to "true" ). The TrendLine Levels extended to the right ( on last bar ) disappears when the position is finished, and that is the indication for "m_CalculatePosition_Finished" not working properly for live data. You can remove " && Bars.Status == EBarState.Close " from line "1144", so you can see the probably bug ( not sure ). This is the reason why I have applied the "close" code. :)

It depends on whether the position "opens" on "close" or not. It's easier to make it happen with simulated trading. If it opens on "close", the live code works from start to end. If it "opens" on live data, the position just ends as it starts. This is what I have discovered however. :P

Hope somebody can trick the code to work, or make it work at all. This will be highly appreciated. :)

Thanks.



[EDIT]: Sorry! I left out " m_CalculatePosition_Finished = true; " with "//" (experimented) on " Take Profit " and " Stop Loss ". The position does not stop with this version. :) The code is stable. See next post.



Best regards,
Johannes Hillestad Baumann
Attachments
Jobauma BuySell.pln.zip
(6.36 KiB) Downloaded 25 times
Last edited by Jobauma on 22 Dec 2018, edited 1 time in total.

User avatar
Jobauma
Posts: 100
Joined: 16 Apr 2013
Has thanked: 22 times
Been thanked: 4 times

Re: Feature Request: A More User-friendly Buy/Sell Solution Integration for MultiCharts ( Indicator Included )

Postby Jobauma » 22 Dec 2018

Code: Select all

[EDIT]: Sorry! I left out "m_CalculatePosition_Finished = true;" with "//" (experimented) on " Take Profit " and " Stop Loss ". The position does not stop with this version. :) The code is stable. See next post.





Best regards,
Johannes Hillestad Baumann
Attachments
Jobauma BuySell.pln.zip
(6.34 KiB) Downloaded 24 times

User avatar
Jobauma
Posts: 100
Joined: 16 Apr 2013
Has thanked: 22 times
Been thanked: 4 times

Re: Feature Request: A More User-friendly Buy/Sell Solution Integration for MultiCharts ( Indicator Included )

Postby Jobauma » 12 Jan 2019

Hi.

I've posted the indicator in " User Contributed Studies " now ( considered done ). The feature request still remains. :)

Link: https://www.multicharts.com/discussion/viewtopic.php?f=20&t=51834



Best regards,
Johannes Hillestad Baumann

User avatar
Svetlana MultiCharts
Posts: 172
Joined: 19 Oct 2017
Has thanked: 1 time
Been thanked: 43 times

Re: Feature Request: A More User-friendly Buy/Sell Solution Integration for MultiCharts ( Indicator Included )

Postby Svetlana MultiCharts » 28 Jan 2019

Hello, Johannes,

If you find some issue in a study calculation, and want to report it to our team - please simplify your script:
remove anything that doesn’t relate to the issue from the script;
reduce the number of script lines to minimum;
add debugging logic to your script that will print its calculation.
After that is done, please reproduce the issue on a simplified environment: 1 workspace with the minimum number of charts opened (1-3).
Then please send us the following files to support@multicharts.com so that we would be able to investigate the issue:
1. The workspace where the issue is reproduced.
2. Export of used symbols (with data) from QuoteManager in .qmd archive: http://www.multicharts.com/trading-soft ... rting_Data
3. The exported scripts with all dependent functions that are used on the workspace: http://www.multicharts.com/trading-soft ... ng_Studies
4. The screenshots demonstrating the issue.
5. Step-by-step instruction how to reproduce the issue.
6. MultiCharts Logs, collected via Feedback application, when the issue is reproduced: http://www.multicharts.com/trading-soft ... harts_Logs
7. If it is related to real-time trading, order ID numbers of the problem orders.
8. Outputs of PowerLanguage Editor, where we could see, that the script has generated some value on the specified bar. Please attach the clarification which value you expected to get instead.
As soon as we receive the requested files, the engineers will study the case and we will get in touch with you when we have any feedback from them.


Return to “MultiCharts .NET”