indiTraders - Forum for the Active Indian Trader  

Go Back   indiTraders - Forum for the Active Indian Trader > Tools > Software > Tradestation

Reply
 
Bookmark and Share LinkBack Thread Tools Display Modes
  #21 (permalink)  
Old 28-02-2012, 11:55 PM
alex alex is offline
indiTraders VIP
 
Join Date: Mar 2009
Location: Mumbai
Posts: 4,928
Thanks: 14,925
Thanked 13,314 Times in 4,262 Posts
alex has a reputation beyond reputealex has a reputation beyond reputealex has a reputation beyond reputealex has a reputation beyond repute
alex has a reputation beyond reputealex has a reputation beyond reputealex has a reputation beyond reputealex has a reputation beyond reputealex has a reputation beyond reputealex has a reputation beyond reputealex has a reputation beyond reputealex has a reputation beyond reputealex has a reputation beyond reputealex has a reputation beyond reputealex has a reputation beyond reputealex has a reputation beyond reputealex has a reputation beyond repute
Default

Position size code -
According to average range of last 5 days of data ( volatility) stops are calculated.
Based on that stops this indicator gives the figure for position size. My risk per every trade is 600 rupees so in input parameters I have selected risk 600, you can change it as per your risk.

Code:
inputs:risk(600);
VARS:MARKETrISK(0),NUMcONTRACTS(0),histVolat(0),averagerange(0);


averagerange = Average(Range,5)of data2;

histVolat = averagerange * 0.25 ;


NUMcONTRACTS = risk/histVolat ;
value1 = Round(numContracts,0);
if(value1 > numContracts) then
numContracts = value1 - 1
else
numContracts = value1;
numContracts = MaxList(numContracts,1);
plot1(numcontracts,"contracts");
Made the formula little more easier to use, simply change the risk input parameter depend on the risk you afford.
__________________
The essence of mathematics is not to make simple things complicated, but to make complicated things simple.

Last edited by alex; 29-02-2012 at 05:15 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following 2 Users Say Thank You to alex For This Useful Post:
Reply

indiTraders - Forum for the Active Indian Trader > Tools > Software > Tradestation


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT +5.5. The time now is 09:57 AM.


vBulletin Copyright by vBulletin

Content Relevant URLs by vBSEO 3.3.2