LinkParticipant
Senior
How to handle tp and sl with 2 long positions.
In the first position the tp is 2.1 and the sl 1.6.
If the price falls 0.8 a second long position enters.
Then the tp of the second position would be 2.9 and the sl 0.8.
And the tp of the first position would remain at 2.1 and sl 1.6.
I can't get it to work like that.
Ideas?
Please post your text in plain text.
You have been reminded the basic rules so many times!
If you want to be helped, respect all the other people in this community.
The ‘Insert PRT Code’ button is to be used with code only.
Thank you 🙂
Have you tried to use “manual stop/profit” instead of the standard, I mean something like this for the tp of the second entry:
IF CLOSE-TRADEPRICE>2.9*CLOSE/100 THEN
SELL X CONTRACT AT MARKET//ONLY THE POSITION OF THE SECOND ENTRY
ENDIF
And the same for all the stops/profits
Another possibility that can work is to make two different systems, one for each of the entrys with its own sl/tp
Buena caza!
Take in consideration that the “manual sl/tp” will be executed at the close of the bar not at any moment as the standard stop
For working as the standard you could use stop orders also, but that will complicate it more
SL and TP cannot be individually kept.
At any new position added (or closed), POSITIONPRICE (an average of the several entry prices) is updated and SL & TP as well.
See the attached pic to know how the average is calculated (it’s the entry price multiplied by the number of lots).