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.
Size:
Color:
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.
Size:
Color:
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 ?
Size:
Color:
The code above should do it.
Size:
Color:
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.
Size:
Color:
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
Size:
Color: