First off, I love these forums... I'm learning so much, and NT support is truly fantastic! Thank you all for your assistance with my issues as I'm working to figure this out!
--
Ok, so the issue I'm having is that SetTrailStop doesn't seem to be resetting.
Here's what I'm trying to do...
- I wait for an entry point
- I SetTrailStop to 99% of entry point, to essentially disable it -- SetTrailStop("Long", CalculationMode.Percent, .99, false);
- I wait for an Entry point to go Long -- EnterLong(quantity, "Long");
- When a predefined profit percentage is hit, I SetTrailStop to 1% to capture the majority of profits
- When the Sell is executed the strategy waits for another entry point
What happens is that if I SetTrailStop to 99% before I EnterLong(), I can't seem to reset it to 1%.
If I don't set it prior to the order, I can SetTrailStop to 1% when a profit target is reached, but then I can't get it back to 99% prior to the next order. It seems like I'm only able to set it once and that's it. This wouldn't be a problem, but I'm trusting that I have good stock picks that will eventually bounce back. So, I want the strategy to reenter when it determines a good entry point, but when it does, it has kept the 1% trail stop (even if I try to reset it).
I've tried referencing the EntryName for the order on the reset or on the initial setting. I've tried without it. I've tried alternating. I've tried using "Trail Stop" as the help guide mentions... none of it seems to work.
Here's the code I'm using:
To Enter a Trade
// Set Trail Stop to 99% (trailStopPercent defaults to 99) SetTrailStop("Long", CalculationMode.Percent, trailStopPercent/100.00d, false); TimeInForce = TimeInForce.Day; // Must be set for Market Orders EnterLong((int)orderQuantity,"Long"); // Buy Quantity Long
// When a profit target is hit, set Trail Stop to 1% (revisedTrailStop defaults to 1) TimeInForce = TimeInForce.Gtc; SetTrailStop("Long", CalculationMode.Percent, revisedTrailStop/100d, false);
-Jeff
Comment