Jump to content
soulavenger8

auto stop loss at 50% upon entry of trade script

Recommended Posts

Hi BBT,

I've been trying to figure out how to set stoploss at 50% below average position upon entry of trade.

Can anyone help me with this?

For example,

Enter trade at $1.

Set SL at $0.50

or 

Enter trade at $0.40. 

SL at $0.20

Thank you.

Share this post


Link to post
Share on other sites

this sets you a 0.5% stop loss to your position.

if you need to change it really to 50% you just move the decimal in the "AvgCost*0.995" so 5% would be "AvgCost*0.95" and 50% would be "AvgCost*0.5"


 

ROUTE=Stop;StopType=Market;StopPrice=AvgCost*0.995;Share=Pos;TIF=DAY;SELL=Send;

 

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.