Jump to content

We have moved to Discord. Please click here to join us in the Trading Terminal Discord server.



These forums are read-only.

Samma

Hotkey to partial a position (either direction), move stop to brekaeven

Recommended Posts

Samma

Hi everyone,

 

I'm stuck on this one. It has to do with how the hotkey calculates shares to update stop position share size. I'm trying to create two hotkey scripts:

  1. If long, add to an open position (e.g. +50%) and move stop to breakeven. If short, partial from an open position (e.g. -50%) and move stop to breakeven. Basically a buy % of position hotkey that works for both directions with a new breakeven stop.
  2. If long, reduce an open position (e.g. -50%) and move stop to breakeven. If short, add to an open position (e.g. +50%) and move stop to breakeven. Basically a sell % of position hotkey that works for both directions with a new breakeven stop.

I'm hung up on the stop in the hotkey script. I think it has to do with the stop direction and share size (selling during a short position adds shares short as opposed to reduces position share size).

 

Anyone have such a script? I've pored over Kyle's scripts but they are so complex, I'm a bit lost.

Edited by Samma

Share this post


Link to post
Share on other sites
Samma

Thanks Peter, looks to be a wealth of knowledge on there but exactly what I wanted. I'd like to learn how to code my own hotkeys.

Share this post


Link to post
Share on other sites

[[Template core/front/global/mobileNavigation is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]

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.