Pyramid Scaling In and Scaling Out - EasyLanguage Programming | futures io social day trading
futures io futures trading


Pyramid Scaling In and Scaling Out
Updated: Views / Replies:336 / 10
Created: by tradestation18 Attachments:3

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 100,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

 
 3  
 
Thread Tools
 

Pyramid Scaling In and Scaling Out

 
Trading Apprentice
Porto Portugal
 
Futures Experience: Beginner
Platform: Tradestation
Favorite Futures: Crude
 
Posts: 8 since May 2018
Thanks: 0 given, 0 received

Pyramid Scaling In and Scaling Out

Hi,

I am trying to create a simple pyramid code with up to 6 cumulative entry orders and exiting with different/independent profit targets for each entry. The entries are triggered by a percentual retreat of the market. Example:
Entry1 at (High - 2%)
Entry2 at (Entry1-2%)
Entry3 at (Entry2-2%)
......

Exit1 at Entry1 + Profit Target 1
Exit1 at Entry2 + Profit Target 2
...

Developed this code which doesnt work properly namely: a) Too much orders withoud respecting the percentual retreat and
b) Sell orders not respecting the Profit Target defined ( Loss instead of profit)


I would be very much obliged if someone could help me on this. Thanks


[IntrabarOrderGeneration = false]
inputs:
PctPullBack( 1 ) , PositionBasis( False ), HD( 0 ), N(0.1), Capital (100000), Amount1 (1000), Price (Close) , // Profit target for first entry
Amount2(1000) , Amount3(1000), Amount4(1000), Amount5(1000), Amount6(1000); // Profit target for other entries


variables: HOD (0),Amt1(0),Amt2(0),Amt3(0),Amt4(0),Amt5(0),Amt6(0);

HOD = HighD( HD );



If CurrentBar> 1 then

Buy ( "ScaleIn 1" ) next bar at HOD * ( 1 - PctPullBack * .01 ) Limit ;
Amt1=Avgentryprice+Amount1*Avgentryprice/Capital ;// set profit tartet for 1st entry based on close of bar, not entryPrice end;
Buy ( "ScaleIn 2" ) next bar at HOD * ( 1 - (1+N)* PctPullBack * .01 ) Limit ;
Amt2=Avgentryprice+Amount2*Avgentryprice/Capital; // set profit tartet for 2nd entry based on close of bar, not entryPrice end;
Buy ( "ScaleIn 3" ) next bar at HOD * ( 1 - (1+2*N) * PctPullBack * .01 ) Limit ;
Amt3=Avgentryprice+Amount3*Avgentryprice/Capital;
Buy ( "ScaleIn 4" ) next bar at HOD * ( 1 - (1+3*N) * PctPullBack * .01 ) Limit ;
Amt4=Avgentryprice+Amount4*Avgentryprice/Capital;
Buy ( "ScaleIn 5" ) next bar at HOD * ( 1 - (1+4*N) * PctPullBack * .01 ) Limit ;
Amt5=Avgentryprice+Amount5*Avgentryprice/Capital;
Buy ( "ScaleIn 6" ) next bar at HOD * ( 1 - (1+5*N) * PctPullBack * .01 ) Limit ;
Amt6=Avgentryprice+Amount6*Avgentryprice/Capital;


sell ("LX1") from entry("ScaleIn 1") next bar at Amt1 limit;
sell ("LX2") from entry("ScaleIn 2") next bar at Amt2 limit; // will exit independently of 1st entry
sell ("LX3") from entry("ScaleIn 3") next bar at Amt3 limit; // will exit independently of other entries
sell ("LX4") from entry("ScaleIn 4") next bar at Amt4 limit; // will exit independently of 2nd entry
sell ("LX5") from entry("ScaleIn 5") next bar at Amt5 limit; // will exit independently of 1st entry
sell ("LX6") from entry("ScaleIn 6") next bar at Amt6 limit; // will exit independently of 2nd entry

 
 
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.

 
 
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,835 since Apr 2013
Thanks: 297 given, 1,119 received
Forum Reputation: Legendary


Hi tradestation18,

can you show an example of "a) Too much orders withoud respecting the percentual retreat and
b) Sell orders not respecting the Profit Target defined ( Loss instead of profit)" on chart and clarify how it should be instead in this situation?

Regards,

ABCTG

 
 
Trading Apprentice
Porto Portugal
 
Futures Experience: Beginner
Platform: Tradestation
Favorite Futures: Crude
 
Posts: 8 since May 2018
Thanks: 0 given, 0 received

Pyramid Scale in and Out

Thanks for your reply. PLease find attache the out put for the following settings:

- PctPullBack 1.5
- PositionBasis true
- HD 15
- N 1.5
- Capital 50000
- Amount1 1000
- Price Close
- Amount2 1250
- Amount3 1500
- Amount4 2000
- Amount5 2500
- Amount6 3000

Attached Thumbnails
Pyramid Scaling In and Scaling Out-ford.png  
Attached Files
Register to download File Type: xlsx FordList.xlsx (12.5 KB, 4 views)
Register to download File Type: xlsx Ford.xlsx (31.7 KB, 3 views)
 
 
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,835 since Apr 2013
Thanks: 297 given, 1,119 received
Forum Reputation: Legendary

tradestation18,

I would check the values for Amt1 to Amt6 using the print reserved word, as they might still be based on the previous entry during your entry bar.

Regards,

ABCTG

 
 
Trading Apprentice
Porto Portugal
 
Futures Experience: Beginner
Platform: Tradestation
Favorite Futures: Crude
 
Posts: 8 since May 2018
Thanks: 0 given, 0 received

Scaling in & Out

Thanks for the tip. Thats my difficulty how to link each entry ("ScaleIn 1"), ("ScaleIn 2").. to the corresponding desired amount of profit Amt1, Amt2,....., that is what should be the correct code for Amt1, Amt2, in order that it links to the corresponding entry ("ScaleIn 1"),("ScaleIn 2"), and not to the previous or actual price Close ...

 
 
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,835 since Apr 2013
Thanks: 297 given, 1,119 received
Forum Reputation: Legendary

Hi tradestation18,

what did the print statements show? This should clarify what needs to be done to give you the desired outcome.

Regards,

ABCTG


tradestation18 View Post
Thanks for the tip. Thats my difficulty how to link each entry ("ScaleIn 1"), ("ScaleIn 2").. to the corresponding desired amount of profit Amt1, Amt2,....., that is what should be the correct code for Amt1, Amt2, in order that it links to the corresponding entry ("ScaleIn 1"),("ScaleIn 2"), and not to the previous or actual price Close ...


 
 
Trading Apprentice
Porto Portugal
 
Futures Experience: Beginner
Platform: Tradestation
Favorite Futures: Crude
 
Posts: 8 since May 2018
Thanks: 0 given, 0 received

The output makes no sense. The sell order is coincident with the buy order, no matter the inputs are:


Type Date/Time Signal Price Roll Over Amt (USD) Shares/Ctrts/Units
Buy 07/31/14 ScaleIn 1 $36.54 $0.00 1368
Sell 07/31/14 LX1 $36.54 $0.00
Buy 08/14/14 ScaleIn 1 $35.08 $0.00 1425
Sell 08/14/14 LX1 $35.08 $0.00
Buy 09/02/14 ScaleIn 1 $34.75 $0.00 1438
Sell 09/02/14 LX1 $34.75

 
 
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,835 since Apr 2013
Thanks: 297 given, 1,119 received
Forum Reputation: Legendary

Hi tradestation18,

what code did you use to create this output? I suggested using the print statement as it might make sense to find out what values your code uses internally for the orders, to find out what you need to change to get the results you want.

What is the value within your code for "Avgentryprice" for example on the bar where you enter?

Regards,

ABCTG

 
 
Trading Apprentice
Porto Portugal
 
Futures Experience: Beginner
Platform: Tradestation
Favorite Futures: Crude
 
Posts: 8 since May 2018
Thanks: 0 given, 0 received


The code is very simple but doesnt work properly because each entry ("ScaleIn 1" and "ScaleIn 2") are not linked with the desired Profit Tareget Price Amt1 and Amt2.

inputs:
PctPullBack( 1 ) , PositionBasis( False ), HD( 0 ), N(0.1), Capital (100000), Amount1 (1000), Price (Close) ,
Amount2(1000) ;// Amount1 and Amount2 are the Profit target

variables: HOD (0),Amt1(0),Amt2(0);
HOD = HighD( HD );

If CurrentBar> 1 then

Buy ( "ScaleIn 1" ) next bar at HOD * ( 1 - PctPullBack * .01 ) Limit ;
Amt1=Close+Amount1*Close/Capital ;// set profit tartet for 1st entry based on close of bar, not entryPrice end;
Buy ( "ScaleIn 2" ) next bar at HOD * ( 1 - (1+N)* PctPullBack * .01 ) Limit ;
Amt2=Close+Amount2*Close/Capital; // set profit tartet for 2nd entry based on close of bar, not entryPrice end;


sell ("LX1") from entry("ScaleIn 1") next bar at Amt1 limit;
sell ("LX2") from entry("ScaleIn 2") next bar at Amt2 limit; // will exit independently of 1st entry


 



futures io > > > > > Pyramid Scaling In and Scaling Out
Thread Tools



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

Journal Challenge w/Earn2Trade and $599 in Prizes

November
 

Anthony Drager: TBA

Nov 29
 

Linda Raschke: TBA

Elite only
 

Peter Davies: TBA

Dec 6
 

Brannigan Barrett: TBA

Elite only
 

Cannon Trading: Ask Me Anything

Dec 13
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
All in all out vs. scaling in and out caprica Psychology and Money Management 130 December 27th, 2015 02:10 AM
Scaling-In vs Scaling-Out as a Tend.... mdsvtr Psychology and Money Management 2 October 28th, 2014 02:05 PM
How to pyramid? dog4 The Elite Circle 10 October 11th, 2013 10:53 AM
Scaling in and scaling out...when the total is NOT the sum of its parts RM99 Psychology and Money Management 8 April 11th, 2012 10:21 AM
Nutrition Plate replaces Food Pyramid Big Mike Off-Topic 3 June 3rd, 2011 01:03 AM


Tags
2nd entry, code, dow, easylanguage, from entry, how to, information, multicharts, neoticker, profit target, scale in, scaling, signal, t1, t3, tapatalk, tradestation, trading, values

All times are GMT -4. The time now is 02:43 PM. (this page content is cached, log in for real-time version)

Copyright © 2018 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 2018-11-18 in 0.14 seconds with 15 queries on phoenix