Place order from indicator in TradeStation Easylanguage - TradeStation | futures io social day trading
futures io futures trading

Place order from indicator in TradeStation Easylanguage
Updated: Views / Replies:1,363 / 3
Created: by loi5139 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 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

Thread Tools

Place order from indicator in TradeStation Easylanguage

Trading Apprentice
NewYork, NY
Futures Experience: None
Platform: tradestation
Favorite Futures: na
Posts: 7 since May 2016
Thanks: 1 given, 2 received

Place order from indicator in TradeStation Easylanguage

Hi experts,

I'm very new to EZL, so sorry for the stupid question.

I created an indicator that signal buy/sell and plot. The signal is working fine. But, when i get the signal I want to place an order from the indicator itself.

I first tried the function Buy/Sell, EZL tells me that's not allowed in indicator. I tried the macro .PlaceOrder, EZL didn't like it when verified.

Now I used the command LimitOrder, but it returns me as invalid order. Thisi is my code. After much reading and research on the net, i'm still a bit confused as to which command/function can be used in indicator.

Any help is much appreciated.

price_trigger = (High + Low) /2 ;
Plot2 (buy_signal, "Buy");
Plot3 (Price_Trigger, "Price_Entry");

PositionQty = Getnumpositions ("SIM8625555M");
OrderQty = UserQty - PositionQty;

//.PlaceOrder "Action='Buy', OrderType = 'Limit', Quantity = OrderQty, QuantityType = 'Shares', Route = 'Intelligent', Symbol = EquitySymbol, SymbolCategory = 'Equity'"; // TRIED THIS, DIDN'T WORK

OrderValid = LimitOrder ("OncePerBar", "SIM8625555M", "Buy", "Equity", EquitySymbol, OrderQty, "1min", "", Price_trigger);

PauseSellTime = Currenttime + 1.5;
PauseBuyTime = Currenttime + 1.5;
//Playsound ("c:\AirHorn.wav");

If OrderValid = 0 then PauseBuyTime = 1;

Elite Member
Chicago, IL USA
Futures Experience: Intermediate
Platform: MultiCharts + CTS T4
Broker/Data: Advantage Futures,
Favorite Futures: YM, ES, EU, US, S
furytrader's Avatar
Posts: 153 since Jun 2011
Thanks: 109 given, 145 received

As far as I recall, you can't place an order from an indicator. You have to use a signal. Copy and paste the indicator logic into a signal and generate the order from there. If your indicator uses parameters, you need to make sure you update parameters in both the indicator and signal for them to remain consistent.

Hamburg Germany
Futures Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
Posts: 1,807 since Apr 2013
Thanks: 293 given, 1,102 received


you are probably better off following furytrader's suggestion and build a signal with similar conditions.

You can send orders out of indicators nowadays using macros and Object Oriented Easylanguage. The latter will likely give you much more control than you have with macros. The downside is both methods will only work realtime and at least OOEL will require advanced coding skills and therefore it's much harder to track down any problems (especially when starting out).

From your code it's hard to tell - I am not sure if "1min" is a valid duration for the order. You might want to try "GTC" or "DAY" in your testing.



Trading Apprentice
NewYork, NY
Futures Experience: None
Platform: tradestation
Favorite Futures: na
Posts: 7 since May 2016
Thanks: 1 given, 2 received

Hi All,

Thanks for the answers. This is what i found and i hope it helps some future noobs like me.

So, i did some research and like you said it turns out that you can't use that macro command or any other buy/sell commands from an indicator, it can be used on strategies only. No matter what other people says on the net. I tested all the options at long and large.

I realized that macro commands and such are not prefered methods by TS. They encourage to use the Providers Object/Class. Which can/must be added to the code from the toolbox in TS Development Envi.

This works really well in indicator, must add the providers class and init them:

PositionQty = GetPositionQuantity (UserSymbol,UserAccount);
OrderQty = UserQty - PositionQty;
OrderTicket1.Symbol = UserSymbol;
OrderTicket1.LimitPrice = Price_Trigger;
OrderTicket1.Quantity = OrderQty;
OrderTicket1.Type = 1; //Limit=1, Market =2
OrderTicket1.Action = 1; //Buy=1 , Sell=2
OrderTicket1.send ();

I use the GetPositionQty command to get the position qty. There is a better way to do that with the providers class PositionsProvider. Supposedly it is a better method.

However, I was not able to make that work with the the OrderTicket class. When using both, it crashes my TS. I can only use either or.

Hope the information noobs like me to save some time in the future.

The following user says Thank You to loi5139 for this post:


futures io > > > > Place order from indicator in TradeStation Easylanguage
Thread Tools

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

September Journal Challenge (sponsored by TopstepTrader)


Battlestations! Win $947 in prizes for showing us your trading desk!


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Place Order just once in a candle raghavan AmiBroker 2 July 5th, 2015 02:36 AM
TradeStation - How to place an order of GTC duration veeyem TradeStation 5 September 9th, 2014 05:12 AM
TradeStation EasyLanguage RadarScreen Indicator Code kitewind TradeStation 3 May 23rd, 2014 05:59 AM
Place text at order entry/exit bar ivanyu EasyLanguage Programming 2 August 5th, 2013 06:20 AM
Is the best way to place a buy limit order by using DOM shots fired ThinkOrSwim 13 April 26th, 2013 05:31 PM

All times are GMT -4. The time now is 05:35 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,
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-10-19 in 0.13 seconds with 22 queries on phoenix