- ago
Hello,

I would like to ask for help as I need to do the following:

Being in a long position, then after passed N bars, only after this period, I want to start monitoring if and when the position will become any profitable (regardless if I have too little or too much profit) and so to trigger the sell of this position at the opening of the next candlestick.

In short: I'm searching how to sell after N bars but only if and when there is any profit.

My problem is that I am not being able to find (using blocks) how to compare the value of the current "Close" with the price value of the opening of the trade, due to the respectives values are placed in the opposite boundaries of the comparison range of bars that are getting more distant between themselves while time series goes ahead.
0
385
2 Replies

Reply

Bookmark

Sort
- ago
#1
QUOTE:
My problem is that I am not being able to find (using blocks) how to compare the value of the current "Close" with the price value of the opening of the trade,

Wealth-Lab 7 currently does not have Position-based conditions as in WL6 (e.g. current Position is (un)profitable, Price is X% higher(lower) than it was at current Position's entry bar etc.). If you haven't done so already then please vote for this feature request and we'll work on re-enabling them:

https://www.wealth-lab.com/Discussion/More-Building-Blocks-exits-conditions-date-intraday-etc-5954
1
Cone8
 ( 25.51% )
- ago
#2
For now, if you're willing to work with the code, click "Open as C# Coded Strategy", paste it here between "Code" tags and we can modify it it quickly for that profitable condition.
1

Reply

Bookmark

Sort