Multiple Entries and Exits - TradeStation | futures io social day trading
futures io futures trading


Multiple Entries and Exits
Updated: Views / Replies:1,073 / 7
Created: by Hussa 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
 

Multiple Entries and Exits

  #1 (permalink)
Trading Apprentice
Freiburg Germany
 
Futures Experience: Advanced
Platform: TradeStation
Favorite Futures: Index
 
Posts: 4 since Apr 2015
Thanks: 1 given, 0 received

Multiple Entries and Exits

Hello

Easy Language allows to utilize various entries and exits which is well known like:

Buy("My1stBuy") Next Bar 200 Shares at Market;
Buy("My2ndBuy") Next Bar 100 Shares at High Stop;
Sell("My1stSell") Next Bar From Entry ("My1stBuy")100 shares at High Limit;
Sell("My2ndSell") Next Bar From Entry ("My2ndBuy")50 shares at Low Stop;
if Time = 1500 then Sell next bar at Market;

I would like to get things like EntryPrice("My1stBuy"), EntryPrice("My2ndBuy"), BarsSinceEntry("My1stBuy"), BarsSinceEntry("My2ndBuy"), HighestHigh("My1stBuy"), HighestHigh("My2ndBuy") and others. The syntax I used is obviously not allowed.

Is there another doable procedure?

Could somebody point me in the right direction?


Thank you very much

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,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

Hussa,

you will have to use OOEL for that. Otherwise (afaik) it won't be possible to access that information for a multi-leg position.

Regards,

ABCTG

Reply With Quote
 
  #3 (permalink)
Trading Apprentice
Freiburg Germany
 
Futures Experience: Advanced
Platform: TradeStation
Favorite Futures: Index
 
Posts: 4 since Apr 2015
Thanks: 1 given, 0 received


ABCTG,

thanks for taking the time - running the risk of sounding ignorant: what is OOEL?

Reply With Quote
 
  #4 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

Hussa,

no worries you don't sound ignorant, just too lazy to use google .
OOEL stands for Object Oriented EasyLanguage and gives you a lot more control and options in your programming.

Regards,
ABCTG

Reply With Quote
 
  #5 (permalink)
Trading Apprentice
Freiburg Germany
 
Futures Experience: Advanced
Platform: TradeStation
Favorite Futures: Index
 
Posts: 4 since Apr 2015
Thanks: 1 given, 0 received

ABCTG,

well, thanks for the Google hint.

It sounds that OOEL is surely far above and beyond what I will ever achieve on the programming side of things. Plus I'm still (happily) stuck with TS2000i and have no plans going to TS 9.0 or higher.

I guess that means that my little project is over before it even started.

Thanks again for your help!

Reply With Quote
 
  #6 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

Hussa,

you are welcome. With TS2000i you'd be stuck indeed. You might want to consider testing your idea in Multicharts as not only can you use your code there, but you can also test your idea. As there it's quite simple to access the values you want.

Regards,
ABCTG

Reply With Quote
 
  #7 (permalink)
Elite Member
Hong Kong
 
Futures Experience: Advanced
Platform: Matlab, TradeStation, Multicharts
Broker/Data: Tradestation, LMAX
Favorite Futures: Forex & Futures
 
Posts: 4 since Jul 2012
Thanks: 0 given, 1 received

Something like this should get you on your way, done without objects


 
Code
Inputs: //
Entry1_lot_size(200),
Entry2_lot_size(100);

Vars: //
MP(0),
My.Real.Position(0),
Number.of.Shares(0),
Bars.Since.Entry1(0),
Bars.Since.Entry2(0),
Entry.Price.Lot1(0),
Entry.Price.Lot2(0),
Highest.High.1(0),
Highest.High.2(0),
Todays.Highest.High(0);


MP=Marketposition;

if date<>date[0] then Todays.Highest.High=-1;

if MP<>MP[1] then
Begin
  Bars.Since.Entry1=0;
  Bars.Since.Entry2=0;
  Number.of.Shares=0;
  Entry.Price.Lot1=0;
  Entry.Price.Lot2=0;
End;

If currentBar=1 then
Begin
  Highest.High.1=High;
  Highest.High.2=High;
  Todays.Highest.High=High;
End;

// Buy 200 shares at 930 or the closest bar to it 
If MP=0 and time >=930 then Buy("My1stBuy") Next Bar Entry1_lot_size Shares at Market;
// find out if you have the shares from the broker
My.Real.Position = GetPositionQuantity(GetSymbolName, GetAccountID);
// How many shares
Number.of.Shares = GetPositionQuantity(GetSymbolName, GetAccountID);
// If we are actually long, keep a track of the number of bars count the number of bars
if (My.Real.Position=1) then Bars.Since.Entry1 = Bars.Since.Entry1+1;
// if you have the first lot, buy the second lot
if ((My.Real.Position=1) and (Number.of.Shares=Entry1_lot_size)) then
Begin
  Entry.Price.Lot1=GetPositionAveragePrice(GetSymbolName, GetAccountID);
  Buy("My2ndBuy") Next Bar Entry2_lot_size Shares at High Stop;
end;
Number.of.Shares = GetPositionQuantity(GetSymbolName, GetAccountID);
if (Number.of.Shares=(Entry1_lot_size+Entry2_lot_size)) then Bars.Since.Entry2 = Bars.Since.Entry2+1;
// Just a simple time rule to sell some of the shares
If MP=1 and time >=1100 and (Number.of.Shares=(Entry1_lot_size+Entry2_lot_size)) then
begin
// Cost of all the shares
  Value1= (GetPositionAveragePrice(GetSymbolName, GetAccountID)*(Entry1_lot_size+Entry2_lot_size));
//Cost of the first lot
  Value2= (Entry.Price.Lot1*Entry1_lot_size);
// Quick divide by zero check
  if Entry2_lot_size>0 then
//Average cost of the second lot is the cost of the second lot divided by the number if shares
  Entry.Price.Lot2=((value1-value2)/Entry2_lot_size);
  Sell("My1stSell") Next Bar From Entry ("My1stBuy")100 shares at High Limit;
  Sell("My2ndSell") Next Bar From Entry ("My2ndBuy")50 shares at Low Stop;
end;

Number.of.Shares = GetPositionQuantity(GetSymbolName, GetAccountID);
// Highest high since Entry 1
If ((MP=1) and(Number.of.Shares=Entry1_lot_size)) then Highest.High.1=highest(High,2);
// Highest high since Entry 2
If ((MP=1) and (Number.of.Shares=(Entry1_lot_size+Entry2_lot_size))) then Highest.High.2=highest(High,2);
// Highest high today
If High>Todays.Highest.High Then Todays.Highest.High=High;

// Get rid of the remainder of the shares at the end of the day and print the info requested
If MP=1 and Time >=1558 then
begin
  Sell next bar at Market;
  Print("I would like to get things like .....");
  Print("My1stBuy Entry Price : ",Entry.Price.Lot1);
  Print("My2ndBuy Entry Price : ",Entry.Price.Lot2);
  Print("BarsSinceEntry My1stBuy : ",Bars.Since.Entry1);
  Print("BarsSinceEntry My2ndBuy : ",Bars.Since.Entry2);
  Print("Highest high My1stBuy : ", Highest.High.1);
  Print("Highest high My2ndBuy : ", Highest.High.2);
  Print("Highest high today : ", Todays.Highest.High);
  Print("This is for educational purposes only, use at your own risk ");
end;

Reply With Quote
The following 3 users say Thank You to aerotrader for this post:
 
  #8 (permalink)
Trading Apprentice
Freiburg Germany
 
Futures Experience: Advanced
Platform: TradeStation
Favorite Futures: Index
 
Posts: 4 since Apr 2015
Thanks: 1 given, 0 received

@aerotrader

Thank you very much for pointing that out. Very helpful indeed.

Reply With Quote

Reply



futures io > > > > Multiple Entries and Exits

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
Webinar: Anthony Drager of MarketDelta on Using Order Flow for Better Entries/Exits Big Mike MarketDelta 14 September 23rd, 2014 06:35 AM
How to mark entries and exits on a chart keymoo The Elite Circle 5 April 23rd, 2013 05:05 PM
Arrows to mark trade entries and exits? plethora ThinkOrSwim Programming 1 March 3rd, 2011 10:47 PM
Outside the box: Random entries, rules based exits Big Mike Traders Hideout 13 June 13th, 2010 09:57 PM


All times are GMT -4. The time now is 07:11 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-16 in 0.10 seconds with 19 queries on phoenix via your IP 54.226.113.250