Jump to content

Recommended Posts

Hi i hope someone can help me with this. Recently i have been journaling my trades and i have been developing a bad habit of letting my winning trades turn into losing ones.  I usually trade from 9:30 am to 12-1pm, with majority of my trades in the morning. In the morning because of the volatility i am not able to enter my stop loss to break even manually fast enough. If anyone has any scripts to when i take my first partial, my stop loss automatically jumps to break even or would like to collab with me to create this hot key script. I am not good at hot key scripting but im learning. If anyone can help me or point me to the right direction it would help me ten fold with my trading and also people that might be struggling with the same problem as me.

Share this post


Link to post
Share on other sites

When you hit the button to take your partial you can add this to the end of it to set a stop at break even. 

This is a 25% partial with stop at break even:

CXL ALLSYMB;ROUTE=SMRTL;Price=Ask+0.02;Share=Pos*.25;TIF=DAY+;BUY=Send;TriggerOrder=RT:STOP STOPTYPE:MARKET StopPrice:AvgCost ACT:BUY QTY:POS TIF:DAY+

  • Like 3

Share this post


Link to post
Share on other sites

Sorry the one I sent you is for a short sell. 

The one below is for a long position to sell 25% and to put a stop at B/E.

CXL ALLSYMB; ROUTE=SMRTL;Price=Bid-0.02;Share=Pos*.25;TIF=DAY+;SELL=Send;TriggerOrder=RT:STOP STOPTYPE:MARKET StopPrice:AvgCost ACT:SELL QTY:POS TIF:DAY+

Now you have the one for a short sell cover 25% if you plan to do any Shorting.

  • Haha 1

Share this post


Link to post
Share on other sites

The "liquidate 25% and move SL to B/E" hot key is excellent.  I tried both the long and short and they worked fine.

However....

If I use these and also partial again with my partial HK, instead of stopping out, it flips the position.

So for example, if I'm long and I sell 25% and move the position to B/E with the HK, then partial again with my partial HK, say 50%, instead of stopping out completely, it will flip the remaining position to short.

My partial 50% script is  ROUTE=SMRTL;Share=Pos*.5;Price=Bid-.05;TIF=DAY+;SELL=Send;

Any advice on how to solve this would be greatly appreciated!  ie, stop out completely, not flip the position.

Thanks!!

Share this post


Link to post
Share on other sites

That totally makes sense!  I tried it and it worked perfectly.  Thanks for your fast response Peter.  I'm not a script wizard and this was driving me nuts.  I'll check out your suggestion tonight on the reverse position, but if you have time to post tomorrow, that will be great.  Thanks again, I really appreciate your time and expertise!

hux

Share this post


Link to post
Share on other sites
On 12/8/2020 at 10:18 AM, peterB said:

you just missed to set a new stop loss and cancel previous order.

CXL ALLSYMB;
ROUTE=SMRTL;
Price=BID-0.05;
Price=Round2;
Share=Pos*.50;
TIF=DAY;
SELL=Send;
ROUTE=STOP;
StopType=Market;
StopPrice=AvgCost;
Share=Pos-share;
TIF=DAY;
SELL=SEND

 

logically you need to

1. cancel current order for the stock
2. sell 50%
3. set new stop loss

there is a newer aproach for the partials to use the same hotkey which uses the "reverse" position so you can save hotkey space by using that. I can post tomorrow or you check it on forum or in kyles hotkey sheet

Hi,

Just confirming. If I wanted to just move the current stoploss to BE, I can just use:

CXL ALLSYMB;
ROUTE=STOP;
StopType=Market;
StopPrice=AvgCost;
Share=Pos-share;
TIF=DAY;
SELL=SEND

Would that work?

Share this post


Link to post
Share on other sites

Hi - If I use the SEND=REVERSE, I believe I need to change the Price=Bid-0.05 as that would only work for liquidating a long position.  Any thoughts?

I'd really like to use the reverse....

Share this post


Link to post
Share on other sites

Thanks Peter and agreed.  What I was thinking of was a hot key to, say, liquidate half my shares with one hot key (using the reverse code) instead of two keys (one for sell and one for cover).   Do you have a script for this?  Thanks!

Share this post


Link to post
Share on other sites

That would work, except I don't see a script to liquidate a market order (or I don't know the script).  I only see the BUY and SELL options.  Is there a script to liquidate at a market order without specifying BUY or SELL (using the Sell=Reverse)?

 

Share this post


Link to post
Share on other sites
On 12/9/2020 at 10:42 AM, peterB said:

no. mind the share size calculation which is needed when you partial but not needed when you just move the stop. Also the Send=Reverse makes your hotkey to work for long and short positions.


CXL ALLSYMB;
ROUTE=STOP;
StopType=Market;
StopPrice=AvgCost;
Share=Pos;
TIF=DAY;
SEND=REVERSE

 

This script works fine when in a short position but when I try to go long it flips it on me and turns it into a short instead of selling. Any way around this? I wouldn't mind having two separate scripts; one long, one short. 

Share this post


Link to post
Share on other sites
On 5/17/2022 at 10:38 PM, peterB said:

that flip you described is just impossible with this hotkey, possibly you having something wrong

can you post your real hotkey?

anyway you can use SEND=BUY or SEND=SELL instead the REVERSE if you want 2 separate hotkeys

Got it. I had the script entered twice thinking I needed to. Didn't realize I could use the same hotkey for both long/short. Rookie mistake. Appreciate the help.

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.