MostProbableAtStop
Author: abegy
Creation Date: 4/22/2011 1:41 AM
profile picture

abegy

#1
I'm interesting to use the function "MostProbableAtStop".

Base on the Dipbuyer script code, can you tell me how to put "MostProbableAtStop" line and what will be parameters to realize a stop if the price drop down to 1% of the entry price for each position ?

CODE:
Please log in to see this code.
profile picture

Eugene

#2
1. MostProbableAtStop is for entering a market with Stop orders whereas your code works with Limit orders. Please clarify as the connection can't be seen.

2. The code snippet creates two Positions but manages the exit for only one of them. Multi-position trading scripts need to follow a different pattern, like the example below illustrates (1% stop loss included):
CODE:
Please log in to see this code.
profile picture

abegy

#3
Sorry if it was not clear. What I would like to do is to buy at a limit price and attach a stop order automatically when the position is opening with the same logic for every buy in the script. I was thinking that I can do that with MostProbableAtStop but not sure and I didn't know how to use it.

The stop is a stop loss and can be triggered only if the price drop down to it.

So based on the dipbuyer strategy, how to add a stop loss ?
profile picture

Eugene

#4
The code above should do it.
profile picture

abegy

#5
I don"t see in your code the Sellatmarket (bar+1...) ? The stop that I want to place must be at the same bar then the opening position and be not link with the sell order.
profile picture

Eugene

#6
QUOTE:
The stop that I want to place must be at the same bar

This one is an important remark because reliably testing same bar stop/limit orders is not as simple. Just give it a thought: given a daily bar, how do you know which order - entry or exit - will execute first??

Check this out: Setting Priority for AtStop/AtLimit Orders
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).