Jump to content
Andrew Aziz

Buy/Sell Hotkeys for Automatic Stop Loss

Recommended Posts

Arishid. That's a pretty cool script. Are you using it with some success? Is anyone else using it with some success? Thank you.

Share this post


Link to post
Share on other sites

Guys. If you set up the Trade Montage w/ new Hot Buttons can you save the DAS settings to return to the original setting? Thank you.

Share this post


Link to post
Share on other sites

Robert. I'm having a problem running the scripts in SIM from Arishid's post from February 13, 2018 at 5:20 AM. Is anyone else?

Share this post


Link to post
Share on other sites

Monk, I haven't tried the hotkeys in this post. What kind of issues are you getting?

 

Could you please elaborate on what you mean by 'save the DAS settings to return to the original setting?'

Share this post


Link to post
Share on other sites

I've been using this script in the SIM and like it very much.  I was wondering if there was a way possible to make the stop loss a percentage of your equity? Say i have $25,000 and i don't want to lose more than 1% of that or $250? Or make it an either/or scenario. Hope that makes sense. Thanks

Share this post


Link to post
Share on other sites

@ Arashid,

I did set up exactly as your buttons and tried to use on a low float stock coz they fluctuate too much. I am having problem with the order though. It was asking me to choose the route...!

Share this post


Link to post
Share on other sites

Somebody asked 

On 6/14/2018 at 9:35 AM, Michael said:

I've been using this script in the SIM and like it very much.  I was wondering if there was a way possible to make the stop loss a percentage of your equity? Say i have $25,000 and i don't want to lose more than 1% of that or $250? Or make it an either/or scenario. Hope that makes sense. Thanks

The following will work assuming your broker gives you a 1 to 4 margin.  For your stop loss to be 1% of your equity you would use this:

BP*0.0025

With a 1 to 4 margin, your Equity=BP/4 or BP*0.25  and 1% of this is BP*0.25*0.01.or  BP*0.0025.

If your broker gives you a 1 to 2 margin then then need to adjust your factor:

BP*0.005

Moderator Edit: This forum post has you covered: 

 

 

Share this post


Link to post
Share on other sites
On 2/12/2018 at 9:20 PM, arashid said:

Here is my setup which I hope you find useful. My buttons consist of 4 for buy and 4 for sell:

 

1YH4Asl.png

 

Notes:

BUY: places a limit order with 1/4 buying power and attaches a stop loss at 99% of last price at time of order. Note, the method suggested by Andrew at the very top didn't work for me and I found out that you couldn't attach a stop loss order with qty = position and price= av.cost as at the time of running the command there is no position to start with. So what I did is send two separate orders with one command, both with 1/4 buying power, one buy limit and one stop market

 

Breakeven: It first cancels any pending orders (i.e the existing stop that went with original order) and then places a stop order at average purchase price

 

Sell Half: Assuming you would do this to cash some profit (i.e you are on the profit side), it cancels any pending order, sells half the position, and then places a stop market for half the position at original purchase price.

 

Close: Sells all and cancels all pending orders

 

Same but opposite positions for the Short commands

 

 

BUY:

ROUTE=LIMIT;Price=Ask+0.05;Share=BP*0.25 ;TIF=DAY+;HANDINST=ANY;SSHARE=0 ;BUY=Send;ROUTE=STOP;StopType=Market;StopPrice=last*0.99;Share=BP*0.25;TIF=DAY+;HANDINST=ANY;SELL=SEND

 

BREAKEVEN:

CXL ALLSYMB;ROUTE=STOP;StopType=Market;StopPrice=AvgCost;Share=Pos;TIF=DAY+;HANDINST=ANY;SELL=Send

 

HALVE:

CXL ALLSYMB;ROUTE=LIMIT;Price=Bid-0.05;Share=Pos*0.5 ;TIF=DAY+;HANDINST=ANY;SSHARE=0 ;SELL=Send;ROUTE=STOP;StopType=Market;StopPrice=AvgCost;Share=Pos*0.5;TIF=DAY+;HANDINST=ANY;SELL=SEND

 

CLOSE:

ROUTE=LIMIT;Price=Bid-0.05;Share=Pos ;TIF=DAY+;HANDINST=ANY;SSHARE=0 ;SELL=Send;CXL ALLSYMB

 

 

SHORT:

ROUTE=LIMIT;Price=Bid-0.05;Share=BP*0.25 ;TIF=DAY+;HANDINST=ANY;SSHARE=0 ;SELL=Send;ROUTE=STOP;StopType=Market;StopPrice=last*1.01;Share=BP*0.25;TIF=DAY+;HANDINST=ANY;BUY=SEND

 

BREAKEVEN:

CXL ALLSYMB;ROUTE=STOP;StopType=Market;StopPrice=AvgCost;Share=Pos;TIF=DAY+;HANDINST=ANY;BUY=Send

 

HALVE:

CXL ALLSYMB;ROUTE=LIMIT;Price=Ask+0.05;Share=Pos*0.5 ;TIF=DAY+;HANDINST=ANY;SSHARE=0 ;BUY=Send;ROUTE=STOP;StopType=Market;StopPrice=AvgCost;Share=Pos*0.5;TIF=DAY+;HANDINST=ANY;BUY=SEND

 

CLOSE:

ROUTE=LIMIT;Price=Ask+0.05;Share=Pos ;TIF=DAY+;HANDINST=ANY;SSHARE=0 ;BUY=Send;CXL ALLSYMB

This is great. I tried it today for short and it really worked. The only thing which didnt work is the CLOSE for short. I dont know what happend but it realy did not work. I have Cover 100% hotkey so i quicky used that and then closed the open Stop order va mouse

Share this post


Link to post
Share on other sites
On 1/17/2018 at 2:33 PM, spmahoney71 said:

I love the idea of a combined buy (or short), and stop feature. The only thing I’m struggling with is that the 30 cent pad may be good for a $25 stock, but on a $2 stock 30 cents is a lot.

 

I guess you could use a LOAD command instead of SEND so you could enter a specific stop value, then hit ENTER.

 

What is more common for experienced traders, a formulaic stop, or something more specific?

A post from arashid will solve the puzzle as it can put a stop loss at 1% of the position

Share this post


Link to post
Share on other sites

@ robert

hi robert,

is there a way to activate the montage when i just click on the related chart? it's faster than clicking on the montage itself or switching between montages.

Share this post


Link to post
Share on other sites
On 1/16/2018 at 5:48 AM, Andrew Aziz said:

ROUTE=SMRTL;Share=BP*0.25;TIF=DAY+;Price=ASK+0.10;BUY=Send;ROUTE=STOP;StopType=Market;StopPrice=AvgCost-0.30;Share=Pos;TIF=DAY+;SELL=Send;

Ok so I have trouble with my hot keys on the Montage. I am pretty new and in simulator.

I have one button with Andrew's script at the top. When I click this sometimes it puts the stop order sometimes it doesn't and it only puts in the order.

Also if I click on SELL 100% button which has the following script:

CXL ALLSYMB; ROUTE=SMRTL;Price=Bid-0.10;Share=Pos;TIF=DAY+;SELL=Send;

Nothing happens!

I truly appreciate any help or if you can guide me with a link/document etc.

Thank you!

Share this post


Link to post
Share on other sites

Hi Le,

Try my hotkeys and see if you're having the same problem. At the bottom of the page. 

 

 

Share this post


Link to post
Share on other sites

@Peter B

 

Like in ToS they are created as OCO (One Cancels Other) you would have how many ever i.e. 3 PTs and 3 seperate stop orders. As one is hit it cancels the other end of the order. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.