Monday, December 01, 2008     | Register
TradersStudio Forums
Subject: Percentage Change -- Newbie Question

You are not authorized to post a reply.   
Author Messages
jbrukh2
Posts:1

08-14-2008 2:48 PM Alert 
Hi,

  I can't seem to find a function in Trader's Studio that will give me the percentage change from, say, the close of one bar to the next.  Moreover, what if I want to have an entire array of price changes in percent?

How would I even implement a simple strategy that, suppose,

-- buys a stock on the first available bar.
-- sells it when the profit is >= 5%, or loss <= 3%.

??

Sorry for the newbie-ness.

Thanks!
murray
Posts:431

08-14-2008 10:57 PM Alert 

Sub TestSys()

If firstbar=barnumber then

Buy("",1,0,market,day)

end if

Exitlong("","",1,1.05*EntryPrice,Limit,Day)

Exitlong("","",1,.97*EntryPrice,Stop,Day)

End Sub

You are not authorized to post a reply.
Forums > TradersStudio 2.x > TradersStudio Basic > Percentage Change -- Newbie Question



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