Question about open PnL as a study/strategy

AlexMc

New member
Joined
Apr 6, 2022
Posts
3
Likes
0
Hello, I have a question about creating a study based on open PnL. What I would like to do is to have a study/strategy that closes out any open position when the open PnL crosses below a certain level. I haven't see any existing programs like this but maybe I've missed it? Would this be a difficult thing to program?

If I was able to create an indicator showing the open PnL it would be easy enough to set an alert to buy/sell once the threshold was exceeded. The only issue would be making sure it is set to either buy or sell correctly based on how the entry was made, and have the correct number of contracts specified. Maybe there is a way to integrate a "close all positions" command into this?

Thanks,
Alex
 

ScottyA

Well-known member
Joined
Aug 1, 2019
Posts
203
Likes
118
Hello, I have a question about creating a study based on open PnL. What I would like to do is to have a study/strategy that closes out any open position when the open PnL crosses below a certain level. I haven't see any existing programs like this but maybe I've missed it? Would this be a difficult thing to program?

If I was able to create an indicator showing the open PnL it would be easy enough to set an alert to buy/sell once the threshold was exceeded. The only issue would be making sure it is set to either buy or sell correctly based on how the entry was made, and have the correct number of contracts specified. Maybe there is a way to integrate a "close all positions" command into this?

Thanks,
Alex

I'm not clear what you're asking because it sounds very similar to how most Strategies already function. For example: Study does X = position does Y.

And if not those Strategies, it sounds like a LMT or MIT order you'd place on the DOM/chart. For example: X level hit = position does Y.

You can also monitor the open PnL in a number of ways through MotiveWave.

Would you elaborate on your idea with specifics?
 

AlexMc

New member
Joined
Apr 6, 2022
Posts
3
Likes
0
Right now I am only using manual entries. For an example, say that the price was moving up and I entered for 1 contract at each of the levels 100, 102, and 104. I could easily attach a stop order to each of these entries so that if the price started moving back down the position would be stopped out 1 by 1.

What I am looking to do is have a single PnL based stop that would close out all positions once hit. So in the example above if the price moved back down to 100 there would already be 6 points of negative PnL. I would want to automatically close all positions when that -6 point PnL level is hit.

Also, in an example where entries were made at only 100 and 102 then the price moved down to 98 that would also be a -6 point position. I would want this position to also automatically close but there are only 2 open contracts in this position instead of 3 in the first example.
 

ScottyA

Well-known member
Joined
Aug 1, 2019
Posts
203
Likes
118
Thanks @AlexMc I'm stuck not understanding the benefit of a study like this when there are existing tools that accomplish what I understand you're asking for.

How is your Study different from Custom Buttons on the DOM or from chart trading using LMT orders that can both be accomplished with one-click?

Are you familiar with these tools? I love custom buttons and use them for both entries and exits. For example, see the Buy LMT -1 and Sell LMT+1. The -1/+1 are not quantity but how many ticks away from current bid/ask I want the order placed. For Quantity, I use simple keyboard shortcuts.

Screen Shot 2022-04-08 at 10.58.39 AM.png
 

AlexMc

New member
Joined
Apr 6, 2022
Posts
3
Likes
0
For making entries there are some good tools out of the box that are available such as automatically attaching stops to orders. My concern is more-so about managing open PnL. I could also manually place exit orders using the DOM or other methods similar to what you are describing above.

What I am looking for is something automatic. I would like to have a fail-safe exit strategy that does not rely on any human input once the trade is entered. It doesn't necessarily have to be a new study or strategy. If I could set up the stop functionality I described in my last post with 1 click at the entry that would be good as well.

Since what I am describing is a scale-in strategy it complicates things vs. a standard 1 entry, 1 exit trade strategy. Maybe there are already some tools available for managing this that I'm not aware of?
 

ScottyA

Well-known member
Joined
Aug 1, 2019
Posts
203
Likes
118
Thanks for elaborating. Good stuff!

I hope that another member in the forum might be able to help with development.
 
Top