Monday, December 01, 2008     | Register
TradersStudio Forums
Subject: profit target

You are not authorized to post a reply.   
Author Messages
maninjapan
Posts:12

01-30-2007 11:24 AM Alert 

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)

 

 

 

 

 

murray
Posts:431

01-30-2007 11:29 AM Alert 

EntryPrice+(500/BigPointValue)

maninjapan
Posts:12

01-30-2007 12:28 PM Alert 

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)

murray
Posts:431

01-30-2007 12:31 PM Alert 
No, it's a built in Keyword.
maninjapan
Posts:12

01-30-2007 12:41 PM Alert 

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

 

murray
Posts:431

01-30-2007 12:48 PM Alert 

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.

maninjapan
Posts:12

01-30-2007 1:17 PM Alert 

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? 

murray
Posts:431

01-30-2007 1:29 PM Alert 
What is in the print windows.
maninjapan
Posts:12

02-06-2007 8:26 AM Alert 
two windows come up.  One lists the figure 25 and the other lists 50
murray
Posts:431

02-06-2007 8:34 AM Alert 
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 ?
maninjapan
Posts:12

02-07-2007 2:24 AM Alert 

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.

murray
Posts:431

02-07-2007 6:42 AM Alert 
Did you look at the code ?. Must be a print statement in it .
maninjapan
Posts:12

02-07-2007 10:14 PM Alert 

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.

maninjapan
Posts:12

02-13-2007 8:59 AM Alert 

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.

murray
Posts:431

02-13-2007 11:05 PM Alert 

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

You are not authorized to post a reply.



ActiveForums 3.6
TradersStudio® Copyright 2004-2008 All Rights Reserved   |  Privacy Statement  |  Terms Of Use