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)
Need help decreasing number of 'placeholder' trades in strategy
I've been running a strategy for a few weeks, which seems to be doing well, but I'd like to further that by decreasing the commissions I'm paying. My code uses order management similar to an example video made by BigMike, so I will reference his example/template for simplicity's sake.
Upon entry, my strategy opens 3 separate long orders. These 3 orders are managed separately, with their own SL, TP, and breakeven point. The first two orders ("target1" & "target2") are opened with extremely small lot sizes, and are essentially there just to serve as a breakeven point for "target3", which carries the majority of the trade size.
The reason I have done it this way is it's the most effective way I could incorporate dynamic trailing stops and profit triggers. It works great, but since "target1" and "target2" are effectively just placeholders, it would be nice if I could alter this method so I didn't actually have to trade target1 and target2 (this avoiding commissions). So does anyone have experience trading a similar method, but avoiding having to enter "placeholder" trades?
Can you help answer these questions from other members on NexusFi?
If I'm understanding correctly you use target 1 & 2 to trigger or have a value for use with your trailing stop. Thinkorswim works in the same way. What I did was this:
def crossAbove = price[1] crosses above Avg[1] and price[1] crosses above ValueHi + entry_price ; This is the criteria that fires my buy order it is simply true of false
I then use this to create a separate order for my trailing stop i.e- def trigger = if crossabove then 1 else 0;
def orderprice = close;
rec ts = if trigger then orderprice - trailstop else if low - trailstop > ts[1] then low - trailstop else ts[1];
def stopout = if trigger then 0 else if low <= ts then 1 else 0;
AddOrder(OrderType.SELL_TO_CLOSE, stopout, ts, name = "Trailing_Stop");
It's mostly about where you point your variables. If you need to discuss this further let me know.