LeoParticipant
Veteran
Another great exit possibility is to add a trend line in maximus and minimus
LowerTrendLine = LEVMIN + (LEVMIN-BLEVMIN)/(POSLEVMIN-BPOSLEVMIN)*(BARINDEX-POSLEVMIN) //trigonometry
UpperTrendLine = LEVMAX + (LEVMAX-BLEVMAX)/(POSLEVMAX-BPOSLEVMAX)*(BARINDEX-POSLEVMAX) // trigonometry
IF longonmarket then
IF close < LowerTrendLine-pipsize THEN
SELL AT MARKET
ENDIF
ENDIF
IF shortonmarket then
IF close > UpperTrendLine + pipsize THEN
EXITSHORT AT MARKET
ENDIF
ENDIF
LeoParticipant
Veteran
Another exit strategy I am working on is posted here
Need help to code a more dynamic trailing stop
did you run a backtest with the new closing conditions anywhere?
LeoParticipant
Veteran
Yes, I improve the equity curve but not the reliability
could you post the complete code with the closing conditions?
LeoParticipant
Veteran
Hi raphaelopilski,
Today I wanted to upload the code and a comparison between two exit strategy. This time the result was uncomfortable to me.
I tested in AUDUSD 1min and the things were totally the oposite.
So better I do not post the version with some other exit position (for no confusing the people) rather I post a photo for give you an idea how they are. But I I said: this time it doesn’t work better
Lets continue working in this project I am very motivated to work finally in something like pattern recognition.
@Leo if i can help you i am here 🙂 i love your ideas and your spirit!
LeoParticipant
Veteran
thanks Gianluca,
well here is the indicator https://www.prorealcode.com/prorealtime-indicators/double-top-double-bottom-detector/
If you find a characteristic that made the double top/bottom reliable that can be very useful. then I hope then I can program it
LeoParticipant
Veteran
Based on having watched charts for years, I have often times noticed that legitimate double tops tend to make a higher high (tops) or lower low (bottoms) on the second top or bottom than the first. The average close of the second top however if measured across the candle directly before the new high (tops) and low (bottoms) along with the candle that printed the actual high or low is usually lower (for tops) or higher (for bottoms).
JuanJ can you please send me I picture with some explanation, that would be great!