random strategy - add scaling in feature - MultiCharts | futures io social day trading
futures io futures trading


random strategy - add scaling in feature
Updated: Views / Replies:1,671 / 12
Created: by treydog999 Attachments:1

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
 1  
 
Thread Tools Search this Thread
 

random strategy - add scaling in feature

  #1 (permalink)
Elite Member
seoul, Korea
 
Futures Experience: Intermediate
Platform: Multicharts
Broker/Data: CQG, DTN IQfeed
Favorite Futures: YM 6E
 
treydog999's Avatar
 
Posts: 894 since Jul 2012
Thanks: 291 given, 1,002 received

random strategy - add scaling in feature

Hi I have a random entry generating strategy that can scale out. But I am having trouble implementing a scale in feature. I want to do coin toss experiments comparing scale in scale out and AIAO. but i just cant figure out how to add scaling in. I am looking to enter a random position then add 1 when the Market Position is = 1 or MP = -1.

can anyone help?

 
Code
input:
ProfitTarget( 0 ),
StopLoss (  0  ),
TicksPerPoint(10000),
Scaleout(false);

Variables: {---------------------------------------------------------------------------------}
vRandomNumber(0);

 vRandomNumber = Intportion( Random(100) );
 
   If ( vRandomNumber >= 50 ) and MP = 0 then
   	buy("LE") next bar at market;
   If ( vRandomNumber < 50 ) and MP = 0 then
	sellshort("SE") next bar at market;

If Scaleout = false then begin
If ProfitTarget > 0 then
	setprofittarget ((ProfitTarget*bigpointvalue)/TicksPerPoint);
If Stoploss > 0 then begin
	setstopcontract;
	setstoploss((Stoploss*bigpointvalue)/TicksPerPoint);
	end;

end;
//print(vRandomNumber, "  ", ProfitTarget*bigpointvalue);

if scaleout = true then begin
	if mp = 1 then begin
	sell 1 contract total next bar at (entryprice+(ProfitTarget/TicksPerPoint)) limit;
	sell 1 contract total next bar at (entryprice+2*(profittarget/TicksPerPoint)) limit;
	sell next bar at (entryprice-(StopLoss/TicksPerPoint)) stop;
	end;
	
	if mp = -1 then begin
	buytocover 1 contract total next bar  at (entryprice-(ProfitTarget/TicksPerPoint)) limit;
	buytocover 1 contract total next bar  at (entryprice-(2*ProfitTarget/TicksPerPoint)) limit;
	buytocover next bar at (entryprice+(StopLoss/TicksPerPoint)) stop;
	end;
	
end;

Reply With Quote
 
  #2 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,455 since Apr 2013
Thanks: 222 given, 829 received

treydog999,
what are the problems you are facing with the scale in part? Do you have it coded and it doesn't do what you have in mind or do you have problems with how to implement it?
If the signal is long and you want to scale in, should add positions on every new bar until the maximum allowed position size is reached?

Regards,
ABCTG

Reply With Quote
 
  #3 (permalink)
Elite Member
seoul, Korea
 
Futures Experience: Intermediate
Platform: Multicharts
Broker/Data: CQG, DTN IQfeed
Favorite Futures: YM 6E
 
treydog999's Avatar
 
Posts: 894 since Jul 2012
Thanks: 291 given, 1,002 received



ABCTG View Post
treydog999,
what are the problems you are facing with the scale in part? Do you have it coded and it doesn't do what you have in mind or do you have problems with how to implement it?
If the signal is long and you want to scale in, should add positions on every new bar until the maximum allowed position size is reached?

Regards,
ABCTG

I do not have it coded. I tried and failed. I posted the code above which does not scale in but can compile. I want it to scale in at a certain amount of ticks after entry which will be selectable. For example if we go long, i would like to select to scale in after 10 ticks in profit, or 10 ticks at a loss. Reverse for shorts. The above code does random generation already so its just a matter of figuring out how to add the new type of order management.

Reply With Quote
 
  #4 (permalink)
Elite Member
Colorado
 
Futures Experience: Advanced
Platform: MultiCharts
Broker/Data: IB & Iqfeed
Favorite Futures: ES , CL
 
sptrader's Avatar
 
Posts: 522 since Apr 2010
Thanks: 1,075 given, 662 received

I think you could get what you want by using the built-in functions Like- currentcontracts, marketposition and Entryprice;
For the second "scaled in" entry, Something like the code below (untested)..

 
Code
 if mp = 1 and currentcontracts = 1 then buy next bar at entryprice(0) +10 points stop;

Reply With Quote
 
  #5 (permalink)
Elite Member
seoul, Korea
 
Futures Experience: Intermediate
Platform: Multicharts
Broker/Data: CQG, DTN IQfeed
Favorite Futures: YM 6E
 
treydog999's Avatar
 
Posts: 894 since Jul 2012
Thanks: 291 given, 1,002 received


sptrader View Post
I think you could get what you want by using the built-in functions Like- currentcontracts, marketposition and Entryprice;
For the second "scaled in" entry, Something like the code below (untested)..

 
Code
 if mp = 1 and currentcontracts = 1 then buy next bar at entryprice(0) +10 points stop;

Yeah i been working with that. it just doesn't function right. I am doing this.

 
Code
IF MP = 1 and currentcontracts = 1 then
	buy ("LEscale") 1 contract next bar at entryprice(0) + .0008 stop;
IF MP = -1 and currentcontracts = 1 then
	sellshort("SEscale") 1 contracts next bar at entryprice(0) - .0008 stop;
its 6E so .0001 tick

Reply With Quote
 
  #6 (permalink)
Elite Member
seoul, Korea
 
Futures Experience: Intermediate
Platform: Multicharts
Broker/Data: CQG, DTN IQfeed
Favorite Futures: YM 6E
 
treydog999's Avatar
 
Posts: 894 since Jul 2012
Thanks: 291 given, 1,002 received

Actually it was a stupid mistake, i forgot to turn on scale in ability and recalculate my profit targets .

Reply With Quote
 
  #7 (permalink)
Elite Member
Colorado
 
Futures Experience: Advanced
Platform: MultiCharts
Broker/Data: IB & Iqfeed
Favorite Futures: ES , CL
 
sptrader's Avatar
 
Posts: 522 since Apr 2010
Thanks: 1,075 given, 662 received

Glad you figured it out- GLTY

Reply With Quote
 
  #8 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,455 since Apr 2013
Thanks: 222 given, 829 received

You might also want to take a look at the "Strategy Position Trades" reserved words, as they are build to handle entries and exits with multiple legs and in my opinion give you a lot
more control.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).



Regards,
ABCTG

Reply With Quote
The following 2 users say Thank You to ABCTG for this post:
 
  #9 (permalink)
Elite Member
OMAHA, NEBRASKA
 
Futures Experience: Intermediate
Platform: MULTICHARTS + TOS
Broker/Data: TRADESTATION + TOS
Favorite Futures: FUTURES
 
HectorPriamedes's Avatar
 
Posts: 23 since Sep 2011
Thanks: 29 given, 30 received

Scaling in AND Scaling out?

ABCTG (or others),

I was reading your reply post about scaling in/out in BM's advanced EasyLanguage video tutorial thread.

https://futures.io/multicharts/11278-video-tutorial-how-create-advanced-multicharts-easylanguage-strategy-3.html#post412706

That thread moved onto other topics. Since TreyDog created this thread just for scaling, and what I am doing is so similar, it makes more sense for me to post here and revive this thread.

TreyDog wanted to compare Scaling in and Scaling out to AIAO. I want to use Scaling In and Scaling Out simultaneously and indefinitely. Does regular Multicharts (not .NET) support this?

Must my entry and exit be coded in the same one signal for this to work? If my entry signal and my exit signal are each an independent signal with independent code, and both signals are added to the same chart, does scaling in and scaling out become impossible to achieve?

For scaling in, I was hoping to merely check the signal properties check box to "Allow up to _____ entry orders in the same direction... "

Meanwhile, on the exit side of things, I was building an independent exit signal to exit only 1 contract each time my exit signal is true and my CurrentEntries > 1.

I was hoping the combination of these two things would allow me to scale in and scale out repeatedly and indefinitely, possibly always being in a trade. (I understand I can't be long and short at once) My real question is with the scaling in and scaling out at the same time.

Thanks in advance.

Reply With Quote
 
  #10 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,455 since Apr 2013
Thanks: 222 given, 829 received


HectorPriamedes,

you can build that and it will work fine in backtesting. If you create issues in realtime will depend on your exact strategy. If you have multiple orders in the market, Multicharts will cancel and resend them in case one order changes.This can become problematic if you handle many open orders at the same time and constantly have to delete/change at least one of them.

Regards,
ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:

Reply



futures io > > > > random strategy - add scaling in feature

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Monte Carlo Analysis w/Kevin Davey

Elite only
 

How-to Choose a Futures Broker w/Lynette Lim @ Phillip Capital

Sep 20
 

Alternative Views on Traditional Tools w/Rhonda Jones

Elite only
     

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 01:10 AM
How to add Strategy in a chart? dream3r NinjaTrader 7 October 2nd, 2014 02:32 AM
Techniques for scaling in DarkPoolTrading Psychology and Money Management 4 August 9th, 2012 02:27 PM
Scaling in and scaling out...when the total is NOT the sum of its parts RM99 Psychology and Money Management 8 April 11th, 2012 09:21 AM
Add to original position in NinjaTrader Strategy ryohkyo NinjaTrader Programming 5 March 14th, 2010 10:48 PM


All times are GMT -4. The time now is 10:14 PM.

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-09-19 in 0.14 seconds with 20 queries on phoenix via your IP 54.198.28.114