Jump to content
Medved Trader Forums

Invalid Quantity Hot Key conditional order


3acor

Recommended Posts

For closing order, you don't need two sections for order, unless you are doing something else in second section.

Prefer to define one set of variables first then use same in all conditionals.

For closing short position, use abs(pos) for quantity in condition if Pos<0.

Link to comment
Share on other sites

4 hours ago, Kasper said:

For closing order, you don't need two sections for order, unless you are doing something else in second section.

Prefer to define one set of variables first then use same in all conditionals.

For closing short position, use abs(pos) for quantity in condition if Pos<0.

ok thanks a lot.. will do that :)

Link to comment
Share on other sites

1 hour ago, Mike Medved said:

3acor - how in the world did you get OrderType1 into the order itself? Were you editing JSON yourself? Can you go to your list of hotkeys, right click on it, export and send it to me?

I am not sure honestly, I think it did it on its own. I sent it. 

Link to comment
Share on other sites

2 hours ago, Arg said:

3acor,

 

When (if) you get your sell hotkey working can you do me a solid and post a snapshot of the entire text here?

 

I have been trying for several days to get this working but haven't figured out how so far.

 

Thanks

Yes sure, I will try to do it later on during the day.

Link to comment
Share on other sites

2 minutes ago, Mike Medved said:

image.png

Thanks a lot Mike. Appreciate it :)

1 hour ago, Mike Medved said:

image.png

 

will add wordier but more clear one in next post. BTW while doing this I found that bug you had 3acor with OrderType1 etc. Will fix.

 

that's good :). What was it ? I am curious :P

Edited by 3acor
Link to comment
Share on other sites

I suggest giving more examples (complete examples with all typical values/variables filled in) in the help.

eg

buy / sell / buy with stop / bracket order with 1 profit target / bracket with 2 profit targets.

This would make life easier for many people I think.

Link to comment
Share on other sites

9 hours ago, 3acor said:

Thanks a lot Mike. Appreciate it :)

that's good :). What was it ? I am curious :P

LOL. Ok I hate to demonstrate my stupidity, but when you change a variable name in the Vars section, the editor would go through and change that variable name everywhere in the hotkey. Unfortunately, one restriction was omitted, so when you changed the variable name from OrderType to OrderType1, it changed the OrderType TAG (not variable) in the Command section to OrderType1 as well.

Link to comment
Share on other sites

11 hours ago, Mike Medved said:

LOL. Ok I hate to demonstrate my stupidity, but when you change a variable name in the Vars section, the editor would go through and change that variable name everywhere in the hotkey. Unfortunately, one restriction was omitted, so when you changed the variable name from OrderType to OrderType1, it changed the OrderType TAG (not variable) in the Command section to OrderType1 as well.

hehe... We all make mistakes, no one is perfect. Ok I see it now, was just wondering as I sure didn't plan it :D

Link to comment
Share on other sites

  • 1 month later...

Mike,

Could you modify the sell hotkey (the one you did above and also attached here)  to include 2 additional cases:

1) sell half of the current position

2) sell the number of shares highlighted in the quantity tabs in the Level 2 window (the row of small tabs along the top). This will be useful as I can scale in to a position by pressing the buy key multiple times and then scale out in stages by pressing the sell key.

 

Untitled.png

Link to comment
Share on other sites

Hi,

If I click on 10 shares in the quantity icon, and then buy 2 lots, I will have 20 shares. If I then use the hotkey below, which uses the default quantity, then it will sell the entire position of 20 shares. Before pressing this key the highlighted quantity is 10 shares, after pressing it has changed to 20 shares. How can I change the hotkey so that the sell quantity is the original buy quantity (i.e. the highlighted value) and not the total quantiy?

 

image.thumb.png.8921bcf84fdfb7aaea610dd671bc5f1f.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...