Position Sizing - Equity Curve Trading - EasyLanguage Programming | futures io social day trading
futures io futures trading


Position Sizing - Equity Curve Trading
Updated: Views / Replies:671 / 3
Created: by CharlieTrader Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Position Sizing - Equity Curve Trading

  #1 (permalink)
Elite Member
London
 
Futures Experience: Advanced
Platform: MultiCharts
Favorite Futures: Global Futures
 
Posts: 6 since Apr 2016
Thanks: 2 given, 0 received

Position Sizing - Equity Curve Trading

Hello guys,

i've actually pinched this code from another user on this site but have been unable to make the modifications to work. Basically the code is looking at the slope of the closed trades equity curve and then passing this to a money management algorithm which resizes the trade size depending on whether the strategy is going through a winning or losing streak.

There are two parts to this, firstly the code to be placed within the strategy code and then secondly the code for the money management algorithm(MM) to be placed in the MM signal section within Portfolio Trader.

At present i have this code for the MM signal but am not sure if i have assigned code correctly to variables or arrays:


var:

AdjustedPositionSize(0),
IDX(0),
TargetRank(0),
EquitySlope(0);


for idx = 0 to portfolioStrategies -1 begin
TargetRank[idx] = pmms_get_strategy_named_num(idx, "TargetRank");
EquitySlope[idx] = pmms_get_strategy_named_num(idx, "EquityCurveSlope");

// Adjust position size based on equity slope

AdjustedPositionSize[idx] = 1.25;
If EquitySlope[idx]>= .150 then AdjustedPositionSize[idx] = 1.5;
If EquitySlope[idx] <= .075 and EquitySlope[idx]> -.075 then AdjustedPositionSize[idx] = .75;
If EquitySlope[idx] <= -.075 then AdjustedPositionSize[idx] = 0;

// Send the adjusted position size back to the strategy

pmms_set_strategy_named_num( idx, "PosSizeScaler", AdjustedPositionSize[idx] );
end;



Secondly there is the code to be placed in the strategy itself:



LRSlopeLen(30);

Array: a_NetPL[](0);
condition1 = Array_setmaxindex(a_NetPL,LRSlopeLen);

Vars:
TotTds(0),
oLRSlope( 0 ),
oLRAngle( 0 ),
oLRIntercept( 0 ),
oLRValueRaw( 0 ) ;

TotTds = TotalTrades;

If TotTds> TotTds[1] then begin
For value1 = LRSlopeLen downto 2 begin
a_NetPL[value1] = a_NetPL[value1-1];
end;
a_NetPL[1] = (PreviousEquity - netprofit)/EquityScaler;
If TotTds>= LRSlopeLen then Value1 = LinRegArray( a_NetPL, LRSlopeLen, 0, oLRSlope, oLRAngle, oLRIntercept, oLRValueRaw ) ;
oLRSlope = oLRSlope / RSize;
end;

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,529 since Apr 2013
Thanks: 230 given, 854 received
Forum Reputation: Legendary


CharlieTrader,

what does the compiler tell you when you try to compile your code? The first one doesn't declare the arrays at all, which basically means you are trying to use a structure within the code that you didn't create first. You need to declare and initialize arrays just like you do with variables plus depending on the array you need to set the sizes.
You should be able to find the examples you need in the MC wiki and the EasyLanguage Essentials PDF (or check your second code piece).

Regards,

ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #4 (permalink)
Elite Member
London
 
Futures Experience: Advanced
Platform: MultiCharts
Favorite Futures: Global Futures
 
Posts: 6 since Apr 2016
Thanks: 2 given, 0 received

Thanks ABCTG, i'll do that.

Cheers

Reply With Quote

Reply



futures io > > > > > Position Sizing - Equity Curve Trading

« average | indicator »
Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Equity Curve Trading - Work Around The9000 MultiCharts 0 January 24th, 2016 08:12 PM
Position sizing and successful trading. johnedoe Psychology and Money Management 20 January 9th, 2015 05:53 AM
Equity curve trading - possible? DarkPoolTrading Psychology and Money Management 19 March 3rd, 2013 08:42 PM
[MC] Trading only when equity curve is higher than its MA Nicolas11 Elite Automated Trading 2 January 22nd, 2012 06:40 PM
Equity Curve Trading dgresens Psychology and Money Management 3 October 9th, 2011 05:54 PM


All times are GMT -4. The time now is 02:32 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-14 in 0.09 seconds with 19 queries on phoenix via your IP 54.221.76.68