Exit position at profit target
Author: sgubba
Creation Date: 2/6/2009 9:07 PM
profile picture

sgubba

#1
Hi Eugene/Cone/Dr. Koch/Experts:

Is it possible to include a code that takes over the steps after opening a position? Since I am not a programmer and like to use the existing ones in the WLP 5.3. But would like to exit with profit target% or use one of the indicators to exit the open position. This inserted code/step should take over and terminate the further code/steps of the script. So makes everyone (end users :) ) happy. Please help the ship load of end users.

P.S: I frequently see the sell code first and then the buy code in many scripts. I didn't get why that is the protocol. Pardon my ignorance. So we don't want to insert a sell code followed by first sell code again. :)

Thanks in advance.
SG
profile picture

Eugene

#2
QUOTE:
Is it possible to include a code that takes over the steps after opening a position? Since I am not a programmer and like to use the existing ones in the WLP 5.3. But would like to exit with profit target% or use one of the indicators to exit the open position. This inserted code/step should take over and terminate the further code/steps of the script. So makes everyone (end users :) ) happy. Please help the ship load of end users.

I'm not sure what you're after. When a position is opened, the Position object is created and thereby it's possible to detect that by checking for the Position is not equal to null. (There are examples in the QuickRef - and for profit target exits as well.) But what's the point to terminate the further logic??
profile picture

sgubba

#3
Thanks for the reply. There are some scripts that are good for entry. When we can not do much modification to the script, I meant to ask for a insert code to exit the position as an example profit target.
Regards,
SG
profile picture

Eugene

#4
QUOTE:
code to exit the position as an example profit target.

It can be as simple as this generic line:
CODE:
Please log in to see this code.
profile picture

sgubba

#5
Nice of you. Thank you very much. :)
SG