Jump to content
rinran

% of equity hotkey

Recommended Posts

Hello again,

I have the following long hotkey to risk $150 per trade with an stop 10% below my average cost:

CXL ALLSYMB;DefShare=BP*0.97;Price=Ask-Price+0.00;SShare=150/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=SMRTM;Price= Ask+0.00;TIF=DAY;BUY=Send;DefShare=400;TriggerOrder=RT:STOP STOPTYPE:MARKET ACT:SELL STOPPRICE:AvgCost*.90 QTY:Pos TIF:DAY;

This hotkey works perfect, and I was wondering if anyone knows how to replicate this but instead of $150 risk it's 1% of my equity per trade, not buying power, equity.

So $30,000 equity - $90,000 buying power would be a $300 risk per trade.

So $50,000 equity - $150,000 buying power would be a $500 risk per trade.

So $80,000 equity - $240,000 buying power would be a $800 risk per trade.

etc

ย 

Cheers,

Ryan

p.s. I talked to DAS chat and he/she/they couldn't come up with a solution for this, that's why I'm asking here.


IF YOU FOUND MY COMMENT HELPFUL ๐Ÿ‘, PLEASE HEART IT ๐ŸคŽ, IT MEANS A LOT ๐Ÿ™‚

Share this post


Link to post
Share on other sites

I'm looking for this hotkey too , it is important because the buying power is not constant ( if you have an open position consume a part of your buying power the next trade you'll take will have the rest of BP while your equity is always the same in specific day )

btwย  up to the limits of my knowledge there is no symbol for Equity to be used in the hotkey formulaย 

Edited by Samer

Share this post


Link to post
Share on other sites
On 9/25/2020 at 12:45 AM, Samer said:

I'm looking for this hotkey too , it is important because the buying power is not constant ( if you have an open position consume a part of your buying power the next trade you'll take will have the rest of BP while your equity is always the same in specific day )

btwย  up to the limits of my knowledge there is no symbol for Equity to be used in the hotkey formulaย 

Hey Samer,

I haven't found a symbol or variable for equity either. DAS suggested using buying power / 4, but that's not always accurate because of maintenance margin requirements.

Cheers,

RR


IF YOU FOUND MY COMMENT HELPFUL ๐Ÿ‘, PLEASE HEART IT ๐ŸคŽ, IT MEANS A LOT ๐Ÿ™‚

Share this post


Link to post
Share on other sites

@rinran I've tried the hotkey script you posted (in training account) and that one actually really interests me, so thank you for posting!

Do you have issues where it only gives you 2 shares, then the next time it gives you proper amount?

What stock price do you use this hotkey with? The 90% stop loss is super far on lower priced stocks. I had to change the avg calc to .99 just to get it close. Do you adjust based on stock price, or just only use for stocks with certain price ranges?

Share this post


Link to post
Share on other sites
On 10/2/2020 at 11:10 AM, Thomas said:

@rinran I've tried the hotkey script you posted (in training account) and that one actually really interests me, so thank you for posting!

Do you have issues where it only gives you 2 shares, then the next time it gives you proper amount?

What stock price do you use this hotkey with? The 90% stop loss is super far on lower priced stocks. I had to change the avg calc to .99 just to get it close. Do you adjust based on stock price, or just only use for stocks with certain price ranges?

@ThomasI've never had that issue. I used that hotkey on stocks from .50 to $50, the trades were momentum trades.

My profit taking hotkey sets my stop-loss to breakeven after one partial, so the 10% loss is just an initial safety net.

If you set the stop-loss to AvgCost * .99 then you're only giving yourself a 1% stop-loss, so if the price dips 1% from your entry you'll get stopped out. So I set it to 10% to get some breathing room for the price to fluctuate.

Edited by rinran

IF YOU FOUND MY COMMENT HELPFUL ๐Ÿ‘, PLEASE HEART IT ๐ŸคŽ, IT MEANS A LOT ๐Ÿ™‚

Share this post


Link to post
Share on other sites
1 hour ago, peterB said:

that advice is very very dangerous. you can very easily lose 10% of your accountย  like this

You're assuming I use 100% of my available equity per trade, which is ludicrous.

It all depends on your share size.

If I take a position with one share at $10, my max risk is $1.

10 (AvgCost) * .10 (10% stop-loss) * 1 (share) = $1 max loss.

If I have 100 shares:

10 (AvgCost) * .10 (10% stop-loss) * 100 (shares) = $100 max loss.

I use Kyle's hotkeys, which I mentioned above, and only risk $150 per trade, so my max loss would be $15.

$150 (max risk) * .10 (10% stop-loss) = $15 max loss.

If you're using 100% of your available equity per trade that is not the best use of capital in my opinion.

Personally I don't use more than 10% of my available equity per trade, the other 90% is invested. Having all of your equity sitting around just for day-trading seems like a waste to me.

Edited by rinran

IF YOU FOUND MY COMMENT HELPFUL ๐Ÿ‘, PLEASE HEART IT ๐ŸคŽ, IT MEANS A LOT ๐Ÿ™‚

Share this post


Link to post
Share on other sites

I posted a detailed walk through of how the hotkeys work a few months back. You might find it interesting. I was working with v2.1 of kyle's spreadsheet back then. I don't know what version it is on now.

ย 

  • Like 2

Share this post


Link to post
Share on other sites
30 minutes ago, JasonH said:

I posted a detailed walk through of how the hotkeys work a few months back. You might find it interesting. I was working with v2.1 of kyle's spreadsheet back then. I don't know what version it is on now.

ย 

Great post Jason! That level of detail is awesome and very helpful.

I guess I'm just lazy and want a variable that relates to available equity lol, there is one for buying power, not sure why equity wouldn't be available too.


IF YOU FOUND MY COMMENT HELPFUL ๐Ÿ‘, PLEASE HEART IT ๐ŸคŽ, IT MEANS A LOT ๐Ÿ™‚

Share this post


Link to post
Share on other sites
7 minutes ago, rinran said:

Great post Jason! That level of detail is awesome and very helpful.

I guess I'm just lazy and want a variable that relates to available equity lol, there is one for buying power, not sure why equity wouldn't be available too.

Ah, but there is... look for the blue "Alternate Formula" in my post "Share = BP *.25 *Price *.01;"

That is DAS speak for DOLLAR RISK as percentage of EQUITY (i.e. not buying power). I know it looks insane but my post explains what is going on there. So if you have an account with $30,000 equity, it will calculate shares based on a 1% ($300) risk.

Edited by JasonH
spelling
  • Like 1

Share this post


Link to post
Share on other sites

In other words "BP * .25 * Price" will give your total equity (account size) if your margin is 4:1, assuming you haven't done anything to "Price" yet in your hotkey.

  • Like 1

Share this post


Link to post
Share on other sites
18 minutes ago, JasonH said:

In other words "BP * .25 * Price" will give your total equity (account size) if your margin is 4:1, assuming you haven't done anything to "Price" yet in your hotkey.

Unfortunately because of maintenance margin and open positions my ratio isn't exact.

If I go into my IB account and divide my buying power by my available equity it's 3.199111765471735.

And that number changes daily, so I could use 3:1, but I'd prefer to wait for a equity variable to be available to me so I don't have to do any recalculation.

Appreciate the ideas though!


IF YOU FOUND MY COMMENT HELPFUL ๐Ÿ‘, PLEASE HEART IT ๐ŸคŽ, IT MEANS A LOT ๐Ÿ™‚

Share this post


Link to post
Share on other sites
On 10/4/2020 at 2:04 PM, rinran said:

@ThomasI've never had that issue. I used that hotkey on stocks from .50 to $50, the trades were momentum trades.

My profit taking hotkey sets my stop-loss to breakeven after one partial, so the 10% loss is just an initial safety net.

If you set the stop-loss to AvgCost * .99 then you're only giving yourself a 1% stop-loss, so if the price dips 1% from your entry you'll get stopped out. So I set it to 10% to get some breathing room for the price to fluctuate.

Thanks for the reply!

I might be using the script you posted incorrectly then. Do I need to double click the chart, like kyle's hotkey requirement to set price, or stop loss? I just clicked the button. First click puts me in with 2 shares. I immediately sell 100% and then click again and it gives me a lot of shares and puts my stop loss really far away.

If you have been using this successfully, it is clearly m user error. Let me know if I need to click for price first or if there is a trick to it. I really like the concept so wanted to try it out.

Share this post


Link to post
Share on other sites
On 10/5/2020 at 6:52 PM, Thomas said:

Thanks for the reply!

I might be using the script you posted incorrectly then. Do I need to double click the chart, like kyle's hotkey requirement to set price, or stop loss? I just clicked the button. First click puts me in with 2 shares. I immediately sell 100% and then click again and it gives me a lot of shares and puts my stop loss really far away.

If you have been using this successfully, it is clearly m user error. Let me know if I need to click for price first or if there is a trick to it. I really like the concept so wanted to try it out.

Double clicking would be used for auto calculating a stop-loss based on your entry, but since you're not auto calculating a stop-loss, you don't need to double-click. The stop-loss will always be 10% below the entry, the entry will be a market order because of "ROUTE=SMRTM". I am trading at Interactive Brokers, so you may need to change this route depending on your broker.


IF YOU FOUND MY COMMENT HELPFUL ๐Ÿ‘, PLEASE HEART IT ๐ŸคŽ, IT MEANS A LOT ๐Ÿ™‚

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.