Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I would like to have all the features of this trailing-stop-function included, only with the difference that the exit occurs with a limit-order.
For example:
SetStopPosition;
SetPercentTrailing(200, 25);
this means:
at 200$-position-profit the TrailingStop is activated, when the current position profit sinks to 150$ a market order is sent to the exchange to exit the position.
I would like to modify this, and exit with a limit-order.
When the current profit sinks to the (as in the above example) +150$-mark, I would like my strategy to send a limit-order to the exchange, so if the limit-order gets filled, I cash in pretty close to the 150$-profit (without commissions).
unfortunately you can't change the behavior of the reserved words. What you can do is to write your own code to send a limit order when your conditions are met and up the limit price thus creating the trailing. If you want your code to be able to update during the bar (or exit during the entry bar), you will need to use intrabar order generation.
I was trying to write such a trailing-stop on my own, the „IntrabarOrderGeneration“ works fine, but I gave up on the rest of the code.
May I ask you to write a few lines of code for me?
Trailingstop Conditions on 15-min.-bars:
Long Trailingstop:
If CurrentHigh >= (EntryPrice + $0.1) then trail with fixed amount of $0.03.
When the exit conditions are met, get out with a limit order.
Or in other words:
$0.1 (or better) profit is the level for the stop to take effect, the trade is closed when $0.03 of the maximum profit are lost, analogous for shorts.
Short Trailingstop:
If CurrentLow <= (EntryPrice - $0.1) then trail with fixed amount of $0.03.
I thought it would be a good idea to create a new thread specifically for EasyLanguage -- TradeStation / MultiCharts / OEC -- requests to get your indicator created for free.
I have a request, is it possible that you help me with this code (Tradestation/EasyLanguage)?
My concern is, that I would like to have a trailing stop (in an automated strategy) that moves in favor with the price,
and it exits with …
, it appears that you don't need the variables EP and MP in your code anymore at all.
What values does MP_prev hold other than the one you used in the initialization? I am thinking along the lines of what this values does with the way you wrote your code and especially what this results in.
You could use the print reserved word to check what values the variable holds.