Try to add to current open trade

Questions about MultiCharts and user contributed studies.
robz7575
Posts: 15
Joined: 17 Feb 2018
Has thanked: 1 time
Been thanked: 1 time

Try to add to current open trade

Postby robz7575 » 22 Feb 2021

I am having trouble trying to add to a short posistion in stocks. Lets say I go short 5 shares on aapl then if the trade goes in my favor 20 cents I want to add 10 more shares. If it continues to go in my favor I want to add 20 shares and so on until I get to my profit target of lets say 150 cents. Trying to also add a stop loss based on x cents above average price. Any help would be apprieacted thx you

User avatar
Kate MultiCharts
Posts: 591
Joined: 21 Oct 2020
Has thanked: 9 times
Been thanked: 148 times

Re: Try to add to current open trade

Postby Kate MultiCharts » 23 Feb 2021

Hello robz7575,

There are several ways you can set order quantity during manual trading.

And here you can find more info about Stop Loss and how to set its parameters.

If that is not what you are looking for, please describe your issue and what you are trying to achieve in more detail.

robz7575
Posts: 15
Joined: 17 Feb 2018
Has thanked: 1 time
Been thanked: 1 time

Re: Try to add to current open trade

Postby robz7575 » 24 Feb 2021

Sorry this is an automated stratgey. I go short, then every say 10 cents I am in profit I want to add to the postion. So first short is 5 shares then second short is 10 shares then 20 shares etc. Once the over all trade not just each order goes to lets say 200 cents I want to buy to cover all the contracts that I have. To stop out for a loss I want to use my average price of say 8 cents. But its 8 cents or x cents past average position. When I add contracts my average postion continues to come down

User avatar
Kate MultiCharts
Posts: 591
Joined: 21 Oct 2020
Has thanked: 9 times
Been thanked: 148 times

Re: Try to add to current open trade

Postby Kate MultiCharts » 18 Mar 2021

Hello,

Here’s an example of code you can use:

Code: Select all

input: Target1(100), Target2(50), Target3(30), Target4(10); sellshort 5 contract next bar at market; sellshort 10 contract next bar at target1 stop; sellshort 15 contract next bar at target2 stop; sellshort 20 contract next bar at target3 stop;
You can place any amount of Stop orders and set their prices via Input or variables.

You can also allow multiple same-direction entry orders (known as pyramiding) so that several trades could be made in a row. You can enable it in the Strategy Properties -> Properties tab -> Position limits section.

robz7575
Posts: 15
Joined: 17 Feb 2018
Has thanked: 1 time
Been thanked: 1 time

Re: Try to add to current open trade

Postby robz7575 » 23 Mar 2021

thx you. What i am trying to do is no matter what I am in a trade to start. So an example is sell short 5 shrare next bar market. Then if the trade does in my favor x cents then add to he posistion so sell short 10 shares. then if trade keeps going in my favor another x cents sell short 20 shares and so on. Once I get to 1.50 sell the whole posistion.below is that I have now

sell short next bar market;


if Openpositionprofit> .08 and Currentshares = 5 then Sellshort 5 shares this bar;
if Openpositionprofit> .16 and Currentshares = 10 then Sellshort 20 shares this bar;
if Openpositionprofit> .24 and Currentshares = 30 then Sellshort 60 shares this bar;
if Openpositionprofit> .32 and Currentshares = 90 then Sellshort 180 shares this bar;
if Openpositionprofit> .40 and Currentshares = 270 then Sellshort 540 shares this bar;
if Openpositionprofit> .48 and Currentshares = 810 then Sellshort 1600 shares this bar;


Return to “MultiCharts”