Jobauma BuySell ( Works well with Playback )

Jobauma
Posts: 113
Joined: 16 Apr 2013
Has thanked: 25 times
Been thanked: 6 times

Jobauma BuySell ( Works well with Playback )

Postby Jobauma » 12 Jan 2019

Hi.

I've made an indicator I consider done. It only works on "close". You can remove " && Bars.Status == EBarState.Close " from line "1110", but then you will run into trouble. The code should in theory work with live movement, but it's like the indicator just stops to work, if you open a position on live movement. If the position opens right on "close" ( easy to test with playback ), the position finishes with live movement. This is what I have discovered. :)

I hope that MultiCharts can make the indicator work with live movement, or maybe somebody can trick the code to work. The main idea is that MultiCharts integrates the concept. :)

Feature Request: viewtopic.php?t=51764

How the indicator works:
The trigger of levels is "close" on 1st bar, and "high/low" with balance of "close" on coming bars. ( If "close" is above "mid" = "High" · If "close" is below "mid" = "Low" ). This is not a precise solution, but it works for playback, otherwise it would only be "close" ( "close" isn't always the same as "high/low", where price has been, with playback ). Therefore it can be a good idea to use the indicator with something like 3M ( to make false signals less likely ). The position is plotted, so you can take the indicator behind price bars. There is trendlines extended to the right ( at last bar ) on ongoing positions, to see the position more clearly ( these disappear on "finish" ).

I hope that somebody can make a better solution ( my programming skills aren't that great ). :)

Last but not least, I've integrated something called "Setback", so you can start a position at historical data ( then there will be created a blue line named " Actual Start " ).

Note: Default values can be changed at line "66" in the code.

Happy playback time!



Best regards,
Johannes Hillestad Baumann
Attachments
Jobauma BuySell.pln.zip
(6.58 KiB) Downloaded 268 times
1 Stop Loss - Start.png
(13.83 KiB) Downloaded 534 times
2 Stop Loss - Breakeven.png
(13.7 KiB) Downloaded 534 times
3 Stop Loss - Trailing.png
(18.09 KiB) Downloaded 534 times
4 Take Profit.png
(19.05 KiB) Downloaded 534 times

Jobauma
Posts: 113
Joined: 16 Apr 2013
Has thanked: 25 times
Been thanked: 6 times

Re: Jobauma BuySell ( Works well with Playback )

Postby Jobauma » 16 Feb 2019

Hi.

I've made the trigger ( of levels ) to be "close" on 1st bar, and "high/low" on coming bars ( no matter what ).

The position opens at "high/low" too ( because of the low resolution of playback - it's practice after all ). Since your lowest timeframe on playback probably is 1M, the indicator doesn't know where price has actually been first and last. This is the reason for the upgrade, but with a low timeframe, like 3M, opening of a position at "high/low" isn't a real issue. :)



Best regards,
Johannes Hillestad Baumann
Attachments
Jobauma BuySell.zip
(6.84 KiB) Downloaded 246 times

Jobauma
Posts: 113
Joined: 16 Apr 2013
Has thanked: 25 times
Been thanked: 6 times

Re: Jobauma BuySell ( Works well with Playback )

Postby Jobauma » 25 Feb 2019

Made the automatic tick unit detector to be more stable. The position can sometimes be 10 times more than what it should be ( or more? ). Going to solve the problem after a while. :)



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


Return to “User Contributed Studies”