ww58
- ago

I have a small question to the code in post #48 from https://www.wealth-lab.com/Discussion/9199, how to add Breakeven correctly? Right now I have this code
CODE:
if (Parameters[2].AsDouble > 0 && LastOpenPosition.MFEPctAsOf(idx) >= Parameters[2].AsDouble) { ClosePosition(LastOpenPosition, OrderType.Stop, orderPrice, "Breakeven"); }
just added as an if else to an existing stop. With the addition of breakeven I will have this as a reference implementation for any strategy.
0
243
Solved
2 Replies

Reply

Bookmark

Sort
- ago
#1
A follow-up conversation has been extracted from https://www.wealth-lab.com/Discussion/9199 into this new thread for convenience.
0
Cone8
 ( 23.27% )
- ago
#2
Instead of "orderPrice" use LastOpenPosition.EntryPrice
0
Best Answer

Reply

Bookmark

Sort