NexusFi: Find Your Edge


Home Menu

 





Automatic Position Sizing


Discussion in TradeStation

Updated
    1. trending_up 2,593 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
GreenMound
Santon, Isle of Man
 
Posts: 2 since Apr 2016
Thanks Given: 1
Thanks Received: 0

Good morning,

I am looking to automate my position size in TradeStation to maintain a constant X% investment in any given market. Ultimately I will be using this to back test strategies for weighted portfolios, and then active trade.

I found the following as an example:

Equity = Round((Capital + NetProfit + OpenPositionProfit),0);
Num_Cts = Round((PercentAllocationPerTrade * Equity) / {XYZ},0);

where I had intended to use the Initial Margin as XYZ. Is there a way to generically 'call' the initial margin on a futures contract such that the same code can be used on all contracts?

Thank you in advance for any advice you may be able to offer.

GM


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Prop Firm Tracked Payouts Hit $115M in Q1 but Growth Fla …
Funded Trading Evaluation Firms
Day 97: Israel-Lebanon Ceasefire Struck Overnight -- WTI …
Traders Hideout
CFTC Opens First COT Report Review in 20 Years -- Asks W …
Traders Hideout
Trump Lands in Beijing on CPI Day: Iran Peace Expires To …
Prediction Markets & Event Contracts
Orban Crashes to 21pct on Record Turnout -- McIlroy Drop …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
21 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
2026 Fire Horse
5 thanks
  #2 (permalink)
maryfromcolorado
Denver CO USA
 
Posts: 32 since Sep 2016
Thanks Given: 0
Thanks Received: 13

Trade Station uses LUA to program custom features. You would probably need to do it in that language. It is a scripting language, so fairly easy to learn.

I thought about using it for some of my strategies as I like the TS interface better than metatrader, but its not compiled so it won't be as fast as JForex/Java or Mql Metatrader.

Cheers
Mary


Reply With Quote
  #3 (permalink)
maryfromcolorado
Denver CO USA
 
Posts: 32 since Sep 2016
Thanks Given: 0
Thanks Received: 13


Oh, I forgot that Trade Station also uses Easy Language to program too.

GL
Mary


Reply With Quote




Last Updated on October 31, 2016


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts