Take profit last low / last swing
Forums › ProRealTime English forum › ProOrder support › Take profit last low / last swing
- This topic has 49 replies, 7 voices, and was last updated 2 years ago by phoentzs.
-
-
12/17/2021 at 3:03 PM #183505
A question regardless of the time frame. As you can see in the picture, my entrances are relatively clear. But that has never been my problem either. My problem is how do I define / code the goal, the takeprofit. Highlighted in color on the picture. In this case it is the final low. Does anyone have an idea how I could code that?
12/17/2021 at 3:26 PM #183507ArrayMin ?
https://www.prorealcode.com/documentation/arraymin/
Or maybe we can’t define Lowest Low until we have a Higher Low?
Looking at the Chart, how about FastAverage[Period,Type](close) > SlowAverage[Period,Type](close)
Good Topic! 🙂
12/17/2021 at 3:51 PM #18350812/17/2021 at 4:03 PM #183510I’ve been doing this all day, manually mind you. With different assets. Wave diver SMA20 / 200 with filter in the M1 works as a mechanical variant. At least today. As I said, I only work from my cell phone at the moment. MACD pullback works very well as well. I’m just looking for a way to get out of the car. An indicator that shows me this or a calculation for the TP.
12/18/2021 at 8:49 AM #183525Did you see the Topic below … MAE using Arrays!
I might even have a go myself, something new to revitalise interest! 🙂
https://www.prorealcode.com/topic/mae-maximisation/
Ha, I fell at the first hurdle … as the code is written, it won’t give us the turning point. Code on the link above is for the MAE after several Orders. But I’m sure a man of your coding calibre can adapt it phoentzs ? 🙂
12/18/2021 at 11:23 AM #18352912/18/2021 at 11:34 AM #183531you should be able to use the inverse of a Donchian stop
12345678910111213// DONCHIAN STOPUpper = Highest[D](high)Lower = Lowest[D](low)if longonmarket thenlaststop = Lower[1]endifif shortonmarket thenlaststop = Upper[1]endifif onmarket thensell at laststop stopexitshort at laststop stopendifnot tested but I think it would be:
12345678910111213// DONCHIAN EXITUpper = Highest[D](high)Lower = Lowest[D](low)if longonmarket thentakeprofit = Upper[1]endifif shortonmarket thentakeprofit = Lower[1]endifif onmarket and positionperf >0 thensell at takeprofit limitexitshort at takeprofit limitendifoptimize D for how far back you want it to look for the last dip / peak
12/18/2021 at 11:54 AM #183533@ Grahal Thanks for your approach. Maybe you could post your version of the code? I still don’t really get it. 🙈 I had already worked through the subject of arrays. Unfortunately, since I’m not a big coder, I still haven’t understood how it works.
12/18/2021 at 12:00 PM #183534@nonetheless Thanks for the suggestion. I understand this solution. 😁 I could try that.
12/18/2021 at 12:08 PM #18353712/18/2021 at 12:10 PM #183538I would also try different values for D upper and D lower, ie DL and DS, as falling price patterns can be very different than rising.
12/18/2021 at 12:13 PM #183539But I think it will take profit the moment you enter.
not if D = 200 (for example)
12/18/2021 at 12:14 PM #18354012/18/2021 at 12:15 PM #18354412/18/2021 at 12:37 PM #183548you could also just use a fast MA with very little lag, like Least Squares or Time Series
-
AuthorPosts
Find exclusive trading pro-tools on