Trailing stop Loss in sequenced orders

B

Bob_n_Cincy

New member
Hi, This is my first question here. I am using TOS to sequence 8 orders(buy, sell, buy, sell, buy, sell, buy, sell). My buy orders are looking at trends to find entry points. My sell orders are looking for exit points and also have a trailing stop for protection. Once in awhile a fast downturn will trigger a stop loss but my entry condition is still there so the next buy order immediately re-buys the position.
Does anybody have a suggestion on how to stop the immediate re-buy? Thanks in advance.
 
bmcgraw393

bmcgraw393

New member
VIP
Hey Bob,
I am assuming you have an algorithm set up to place your trades for you? If so, what I do is set up a certain signal as my 'reset'; the program cant buy again until it sees the reset. Lets say your buy signal is formed when the hull moving average first starts to move up and your sell if when it first starts to move down. You need to find a way to tell your algorithm that it is not able to buy again until it sees a sell signal from the hull moving average (even though you already sold from your stop loss). This will prevent a series of quick buys and sells which could completely wipe out your account in a few seconds.

Let me know if this helps
 
B

Bob_n_Cincy

New member
Thanks bmcgraw,
Your response is going to solve my problem. I was triggering my buy on the slope of a MA.
If I change my code from:
buy = MA[0]>MA[1];
to
buy = MA[0]>MA[1} and MA[2]>=MA[1];
This new code will only trigger for one period, instead of staying on.

Right now I only know how to stack 8 trades. Is there a way to stack more?
Bob
 
bmcgraw393

bmcgraw393

New member
VIP
Glad to help,
Can you explain a little more? Are you wondering if there is a way to watch more than 8 tickers?
 
B

Bob_n_Cincy

New member
Glad to help,
Can you explain a little more? Are you wondering if there is a way to watch more than 8 tickers?

No,
I trade only one stock. QQQ On the TOS platform, you can write an algorithm that will virtual trade over and over as long as you want. That works great.
But when I want to do real trading, I have to paste my code into a buy order and a sell order. I then duplicate that 3 times to give me 8 total trades.
In the order box, I select "1st triggers sequence"
When I get home at night I check on how it did and repeat the process.
I wish I could set up about 40 trades and only check it once a week.
 
bmcgraw393

bmcgraw393

New member
VIP
No,
I trade only one stock. QQQ On the TOS platform, you can write an algorithm that will virtual trade over and over as long as you want. That works great.
But when I want to do real trading, I have to paste my code into a buy order and a sell order. I then duplicate that 3 times to give me 8 total trades.
In the order box, I select "1st triggers sequence"
When I get home at night I check on how it did and repeat the process.
I wish I could set up about 40 trades and only check it once a week.

Are you an experienced programmer? If so, I use the tos API which allows for you to purchase a certain dollar amount of shares: https://developer.tdameritrade.com/apis
 
M

msammons

New member
You are in a trade which hits $0.50 profit (with target profit of $1.00), but the stock reverses. After hitting at least a $0.50 profit (like a floating PL), is there a way to script a stop loss exit at the entry price? In other words, the stop loss at entry price would only trigger "after" the floating PL had at some point reached at least +$0.50?
 

Similar threads

Top