Advertisement
retesere20

nt daily exit -sample old

Sep 19th, 2019
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. if (!slFired)
  2. {
  3. slVal = Math.Max(0, (MaxDailyLoss + currentDayProfit) / Position.Quantity);
  4. slFired = true;
  5. double offset = (slVal / tickValue) * TickSize;
  6. StopPriceL = Close[0] - offset;
  7. StopPriceS = Close[0] + offset;
  8. }
  9. ExitShortStopMarket(Position.Quantity, StopPriceS, "ExitStopS", "entryShort1");
  10. ExitShortStopMarket(Position.Quantity, StopPriceS, "ExitStopS", "entryShort2");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement