Deane Kebblewhite
 New Member Posts:12
 |
| 01-30-2007 11:24 AM |
|
if I was looking to set an exit long with a specific $ profit target what would it be?
exitlong("buyex","",1,entryprice+$500,limit,day)
what would the correct code be for the dollar amount?
And If I was looking to set it at a certain amount of minimum movements(say 5 here) to test on a basket of products,
would the following cover it?
Minmove = getactiveminmove()
exitlong("buyex","",1,entryprice+minmove*5,limit,day)
|
|
|
|
|
mur ang
 Advanced Member Posts:525
 |
| 01-30-2007 11:29 AM |
|
EntryPrice+(500/BigPointValue) |
|
|
|
|
Deane Kebblewhite
 New Member Posts:12
 |
| 01-30-2007 12:28 PM |
|
Thanks Murray, so would the following be correct then? Does Bigpointvalue need to be identified somewhere or is it just put in as is?
exitlong("buyex","",1,entryprice+(500/bigpointvalue),limit,day) |
|
|
|
|
mur ang
 Advanced Member Posts:525
 |
| 01-30-2007 12:31 PM |
|
No, it's a built in Keyword. |
|
|
|
|
Deane Kebblewhite
 New Member Posts:12
 |
| 01-30-2007 12:41 PM |
|
I tried to put it into a system, jsut to see how it works. The trades executed on opne, but every single trade exited on the entry price, so I ended up with 0 profit/loss. Obviously Im missing something, just cant see what.
Here is the code
sub profitexit_test Dim minmove
Buy("buyent",1,Open,Market,Day)
exitlong("buyex1","buyent",1,entryprice+(200/bigpointvalue),limit,day)
End Sub
|
|
|
|
|
mur ang
 Advanced Member Posts:525
 |
| 01-30-2007 12:48 PM |
|
What are you trading. ,
Print out BigPointValue, I wonder if it not set correctly. Maybe minmove is set wrong
Print BigPointValue
Add that to your code. |
|
|
|
|
Deane Kebblewhite
 New Member Posts:12
 |
| 01-30-2007 01:17 PM |
|
tested on C_REV.CSV and SP_REV.CSV data that came with TS.
50 and 250 came up in the 2 print windows...
Is there something I need to change in the data? |
|
|
|
|
mur ang
 Advanced Member Posts:525
 |
| 01-30-2007 01:29 PM |
|
What is in the print windows. |
|
|
|
|
Deane Kebblewhite
 New Member Posts:12
 |
| 02-06-2007 08:26 AM |
|
two windows come up. One lists the figure 25 and the other lists 50 |
|
|
|
|
mur ang
 Advanced Member Posts:525
 |
| 02-06-2007 08:34 AM |
|
Posted By maninjapan on 02-06-2007 8:26 AM two windows come up. One lists the figure 25 and the other lists 50 Please explain ? |
|
|
|
|
Deane Kebblewhite
 New Member Posts:12
 |
| 02-07-2007 02:24 AM |
|
Sorry, typo in that last one. The value for C_REV came back as 50 and the value for SP_REV came back as 250.
The code used is the same as earlier in this thread. |
|
|
|
|
mur ang
 Advanced Member Posts:525
 |
| 02-07-2007 06:42 AM |
|
Did you look at the code ?. Must be a print statement in it . |
|
|
|
|
Deane Kebblewhite
 New Member Posts:12
 |
| 02-07-2007 10:14 PM |
|
sub profitexit_test
Dim minmove
minmove= getactiveminmove()
Print bigpointvalue
Buy("buyent",1,Open,Market,Day)
ExitLong("buyex1","buyent",1,EntryPrice+(200/bigpointvalue),Limit,Day)
End Sub
This is the code as I ran it. 2 print windows came up (one for each data file) One returned a value of 50 (for C_REV.CSV) and the other print window returned a value of 250 (for SP_REV.CSV)
All trades still close on the same point they open at though. |
|
|
|
|
Deane Kebblewhite
 New Member Posts:12
 |
| 02-13-2007 08:59 AM |
|
sub profitexit_test
Dim minmove
minmove= getactiveminmove()
Print bigpointvalue
Buy("buyent",1,Open,Market,Day)
ExitLong("buyex1","buyent",1,EntryPrice+(200/bigpointvalue),Limit,Day)
End Sub
This is the code as I ran it. 2 print windows came up (one for each data file) One returned a value of 50 (for C_REV.CSV) and the other print window returned a value of 250 (for SP_REV.CSV)
All trades still close on the same point they open at though. |
|
|
|
|
mur ang
 Advanced Member Posts:525
 |
| 02-13-2007 11:05 PM |
|
You had a print statement in the code
Print bigpointvalue.
You should go though the smaller book TradersStudio basic on and work though the execises that would help |
|
|
|
|