How do I enter at a broken level one time only? - TradeStation | futures io social day trading
futures io futures trading


How do I enter at a broken level one time only?
Updated: Views / Replies:423 / 5
Created: by ReximusMaximus 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

Reply
 
Thread Tools Search this Thread
 

How do I enter at a broken level one time only?

  #1 (permalink)
SAINT LOUIS
 
 
Posts: 8 since Aug 2019
Thanks: 3 given, 0 received

How do I enter at a broken level one time only?

I'm trying to test a strategy that buys broken pivot levels.

I have the entries working fine, but I am having a very tough time getting the code to allow one trade per setup.

I've attempted to create a variable called buyflag, and when a trade is placed I set it equal to the buy_level_one (broken pivot high). This seems to work in that it allows only one buy, and I would imagine that I'd need to create thousands of these in order to test it over time.

I'm sure there's a simpler way to do this, for example maybe reference the most recent limit price, and I can check for that when placing the trade?

I'm very new to easylanguage and have been banging my head against a wall for a while on this and thought I'd ask for help.

Here's an example of the entry code:

 
Code
//long  entry	
if
	buyflag <> buy_level_one and
	buy_level_one > 0 and
	close > buy_level_one and
	time > starttime and
	time < endtime then begin
		buy next bar tradesize contracts buy_level_one+(buffer) limit;
		buyflag = buy_level_one;
	end;

Reply With Quote
 
  #2 (permalink)
Agoura Hills, CA USA
 
Trading Experience: Intermediate
Platform: Tradestation
Broker/Data: TradeStation
Favorite Futures: Futures & Equities
 
numberjuani's Avatar
 
Posts: 107 since Apr 2019
Thanks: 6 given, 74 received


ReximusMaximus View Post
I'm trying to test a strategy that buys broken pivot levels.

I have the entries working fine, but I am having a very tough time getting the code to allow one trade per setup.

I've attempted to create a variable called buyflag, and when a trade is placed I set it equal to the buy_level_one (broken pivot high). This seems to work in that it allows only one buy, and I would imagine that I'd need to create thousands of these in order to test it over time.

I'm sure there's a simpler way to do this, for example maybe reference the most recent limit price, and I can check for that when placing the trade?

I'm very new to easylanguage and have been banging my head against a wall for a while on this and thought I'd ask for help.

Here's an example of the entry code:

 
Code
//long  entry	
if
	buyflag <> buy_level_one and
	buy_level_one > 0 and
	close > buy_level_one and
	time > starttime and
	time < endtime then begin
		buy next bar tradesize contracts buy_level_one+(buffer) limit;
		buyflag = buy_level_one;
	end;

Try this before your order EntriesToday(date) = 0 if you want to only allow one trade a day and if you want to make sure its not taking the trade at the same level as before reference the previous entry price.

if EntryPrice(1) = buy_level_one then no trade!


Last edited by numberjuani; November 21st, 2019 at 07:13 PM.
Reply With Quote
The following 2 users say Thank You to numberjuani for this post:
 
  #3 (permalink)
SAINT LOUIS
 
 
Posts: 8 since Aug 2019
Thanks: 3 given, 0 received



numberjuani View Post
Try this before your order EntriesToday(date) = 0 if you want to only allow one trade a day and if you want to make sure its not taking the trade at the same level as before reference the previous entry price.

if EntryPrice(1) = buy_level_one then no trade!

Thanks for the suggestion, I'll mess around with this. I typically do only take one trade per day with this when I trade manually.

Cool dog btw!

edit: also that entryprice reserved word also may work perfectly.

Reply With Quote
 
  #4 (permalink)
germany
 
 
Posts: 3 since Nov 2019
Thanks: 1 given, 2 received

You also can add this filter if you want to open only once a day

 
Code
//long  entry	
if
	buyflag <> buy_level_one and
	buy_level_one > 0 and
	close > buy_level_one and
	time > starttime and
        Closed_Daily <> CloseD(1) and
	time < endtime then begin
		buy next bar tradesize contracts buy_level_one+(buffer) limit;
		buyflag = buy_level_one;
                Closed_Daily = CloseD(1);

	end;

Reply With Quote
The following user says Thank You to Germany1960 for this post:
 
  #5 (permalink)
SAINT LOUIS
 
 
Posts: 8 since Aug 2019
Thanks: 3 given, 0 received

In case anyone stumbles across this thread with the same question, using entryprice worked like a charm if you're okay with multiple entries per day.

Reply With Quote
 
  #6 (permalink)
Seattle, WA/USA
 
Trading Experience: Intermediate
Platform: TOS, TS
Favorite Futures: Forex, crude
 
Posts: 58 since Sep 2016
Thanks: 7 given, 18 received

Another option if you want more than 1 trade per day, but only once at a given level might be to add a counter. (caveat, not sure the code below would work without knowing more fully how your entire code operates, so think of it conceptually more than anything)
 
Code
//long  entry	
if
	buyflag <> buy_level_one and
	buy_level_one > 0 and
	close > buy_level_one and
	time > starttime and
        Closed_Daily <> CloseD(1) and
        buy_level_one_counter = 0 and
	time < endtime then begin
		buy next bar tradesize contracts buy_level_one+(buffer) limit;
		buyflag = buy_level_one;
                Closed_Daily = CloseD(1);
                buy_level_one_counter = buy_level_one_counter [1] + 1;
	end;

Follow me on Twitter Reply With Quote

Reply



futures io > > > > How do I enter at a broken level one time only?

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Show us your trading desks and win $1,400 in prizes w/Earn2Trade

November
 

futures io is celebrating 10-years w/ over $18,000 in prizes!

Right now
 

$250 Amazon Gift Cards with our "Thanks Contest" challenge!

Right now
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
enter at the closing price of the previous bar - limit order kburks NinjaTrader 1 October 8th, 2018 03:52 PM
To avoid the trade at the same previous price/signal tradingest The Elite Circle 1 October 24th, 2016 06:53 PM
Can I trigger an order only if a previous order has been triggered? Yakito IB Trader Workstation 0 December 29th, 2014 04:43 PM
can i place limit order, target price, & protective stop simultaneously shots fired ThinkOrSwim 4 June 22nd, 2013 04:31 AM
Same Strategy, Same Market, Same Time = Different trades! MXASJ NinjaTrader Programming 22 January 29th, 2010 05:25 AM


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

Copyright © 2019 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