Why doesn't this work? I could never get the entryprice keyword to work.
If marketposition = 1 then
sell("My Long Exit") entry("My Long") entryprice(0) - 2 stop;
entryprice(0)
-
- Posts: 261
- Joined: 28 Feb 2008
- Has thanked: 2 times
- Been thanked: 1 time
- Bruce DeVault
- Posts: 438
- Joined: 19 Jan 2010
- Location: Washington DC
- Been thanked: 2 times
- Contact:
-
- Posts: 261
- Joined: 28 Feb 2008
- Has thanked: 2 times
- Been thanked: 1 time
-
- Posts: 100
- Joined: 17 Jul 2009
- Location: Germany
You are doing this a bit wrong, entryprice - 2 would, just as an example, for Forex mean
Entryprice (let´s say 1.5242) - 2 = you want to sell when the price is at at -0.5. Which makes no sense.
You need to use
Entryprice - 2 points
So your formula would look like:
If marketposition = 1 then
sell("My Long Exit") entry("My Long") (entryprice - 2 points) stop;
Entryprice (let´s say 1.5242) - 2 = you want to sell when the price is at at -0.5. Which makes no sense.
You need to use
Entryprice - 2 points
So your formula would look like:
If marketposition = 1 then
sell("My Long Exit") entry("My Long") (entryprice - 2 points) stop;
-
- Posts: 261
- Joined: 28 Feb 2008
- Has thanked: 2 times
- Been thanked: 1 time
This is designed for the ES. I added the key word points just to try and got the same result.
I strongly believe that the entryprice keyword does not work in Multicharts.
Unfortunately the way I test what certain variables are showing is buy creating an indicator with the same code and leaving out the buy/sell orders and ploting what I am looking at. Can't be done for strategy specific keywords though.
I strongly believe that the entryprice keyword does not work in Multicharts.
Unfortunately the way I test what certain variables are showing is buy creating an indicator with the same code and leaving out the buy/sell orders and ploting what I am looking at. Can't be done for strategy specific keywords though.
- Bruce DeVault
- Posts: 438
- Joined: 19 Jan 2010
- Location: Washington DC
- Been thanked: 2 times
- Contact:
-
- Posts: 100
- Joined: 17 Jul 2009
- Location: Germany
Well, I can only say that "entryprice" always works fine for me as my exit strategies are also based on it solely.That is for automated EUR/USD trading though.
You can do this, let the system open a trade and add a
print (entryprice);
Then look at the output and see if it prints the correct entryprice.
You can do this, let the system open a trade and add a
print (entryprice);
Then look at the output and see if it prints the correct entryprice.
- Bruce DeVault
- Posts: 438
- Joined: 19 Jan 2010
- Location: Washington DC
- Been thanked: 2 times
- Contact: