Avoiding re-entries - EasyLanguage Programming | futures io social day trading
futures io futures trading


Avoiding re-entries
Updated: Views / Replies:1,683 / 14
Created: by Bodil 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
 

Avoiding re-entries

  #1 (permalink)
Elite Member
Oslo, Norway
 
Futures Experience: Advanced
Platform: TradeStation / MultiCharts
Favorite Futures: Forex / Futures
 
Bodil's Avatar
 
Posts: 26 since Aug 2012
Thanks: 5 given, 0 received

Avoiding re-entries

Hi everybody.

I have a strategy where the entry logic is RSI > OverBought for long and RSI < OverSold. If I use "crosses over" and "crosses under" respectively, no trades are generated for some reason. If the price reaches my profit target or stoploss level and the condition is still true, the system takes a new entry. How can I avoid these re-entries? What I want to achieve is only one entry per new signal.

Thank you very much in advance!

Reply With Quote
 
  #2 (permalink)
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.

 
  #3 (permalink)
Market Wizard
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,388 since Jul 2012
Thanks: 1,138 given, 4,387 received
Forum Reputation: Legendary



Bodil View Post
Hi everybody.

I have a strategy where the entry logic is RSI > OverBought for long and RSI < OverSold. If I use "crosses over" and "crosses under" respectively, no trades are generated for some reason. If the price reaches my profit target or stoploss level and the condition is still true, the system takes a new entry. How can I avoid these re-entries? What I want to achieve is only one entry per new signal.

Thank you very much in advance!

Crosses over and Crosses under should work. I bet there is something else hindering signals. Please post non-proprietary portions of your code, along with a chart showing what is wrong. Or, print out values of RSI, Oversold and Undersold after each bar, and see if the data shows cross over and cross under.

If you have any questions please send me a Private Message or use the futures.io "Ask Me Anything" thread
Reply With Quote
The following user says Thank You to kevinkdog for this post:
 
  #4 (permalink)
Elite Member
Oslo, Norway
 
Futures Experience: Advanced
Platform: TradeStation / MultiCharts
Favorite Futures: Forex / Futures
 
Bodil's Avatar
 
Posts: 26 since Aug 2012
Thanks: 5 given, 0 received

The code is very basic:

inputs:
Price( Close ),
Length( 14 ),
OverSold( 40 ),
OverBought( 60 );

variables:
RSI_Mod( 0 ),
Signal(0) ;

RSI_Mod = RSI( (c+h+l)/3, Length );


//Long Entry
If RSI_Mod crosses over OverBought
Then Buy ("LE-RSI") next bar at open limit;


//Short Entry
If RSI_Mod crosses under OverSold
Then SellShort ("SE-RSI") next bar at open limit;

Reply With Quote
 
  #5 (permalink)
Market Wizard
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,388 since Jul 2012
Thanks: 1,138 given, 4,387 received
Forum Reputation: Legendary


Bodil View Post
The code is very basic:

inputs:
Price( Close ),
Length( 14 ),
OverSold( 40 ),
OverBought( 60 );

variables:
RSI_Mod( 0 ),
Signal(0) ;

RSI_Mod = RSI( (c+h+l)/3, Length );


//Long Entry
If RSI_Mod crosses over OverBought
Then Buy ("LE-RSI") next bar at open limit;


//Short Entry
If RSI_Mod crosses under OverSold
Then SellShort ("SE-RSI") next bar at open limit;


Code looks good. Please show example of this not working as you expect.

If you have any questions please send me a Private Message or use the futures.io "Ask Me Anything" thread
Reply With Quote
 
  #6 (permalink)
Elite Member
Oslo, Norway
 
Futures Experience: Advanced
Platform: TradeStation / MultiCharts
Favorite Futures: Forex / Futures
 
Bodil's Avatar
 
Posts: 26 since Aug 2012
Thanks: 5 given, 0 received

If you look at the attached example, I would have expected the system to go long somewhere between 10.30 and 11.00. It does not.

Attached Thumbnails
Avoiding re-entries-audjpy-ex.bmp  
Reply With Quote
 
  #7 (permalink)
Market Wizard
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,388 since Jul 2012
Thanks: 1,138 given, 4,387 received
Forum Reputation: Legendary

Here is your problem:

Then Buy ("LE-RSI") next bar at open limit;



This says to place a limit order to buy at the open of the current signal bar. So, if the price of the next bar never goes below the open of the signal bar, no fill will occur.

Maybe you want instead:

Then Buy ("LE-RSI") next bar at market;

If you have any questions please send me a Private Message or use the futures.io "Ask Me Anything" thread
Reply With Quote
 
  #8 (permalink)
Elite Member
Oslo, Norway
 
Futures Experience: Advanced
Platform: TradeStation / MultiCharts
Favorite Futures: Forex / Futures
 
Bodil's Avatar
 
Posts: 26 since Aug 2012
Thanks: 5 given, 0 received

OK. Thanks!

But is there a way to use limit orders instead of market orders? The spread is so big it eats the profits before you even enters the trade......

Also, if I should use the "larger than" respectively "smaller than" instead of crosses over/under: Is there a way I can avoid re-entries in the same direction on the same entry signal?

Reply With Quote
 
  #9 (permalink)
Market Wizard
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,388 since Jul 2012
Thanks: 1,138 given, 4,387 received
Forum Reputation: Legendary


Bodil View Post
OK. Thanks!

But is there a way to use limit orders instead of market orders? The spread is so big it eats the profits before you even enters the trade......

Also, if I should use the "larger than" respectively "smaller than" instead of crosses over/under: Is there a way I can avoid re-entries in the same direction on the same entry signal?


1. If the spread is so big, maybe you should not be trading it. Big spreads grind you down, even if you only have then on stop orders.

2. To take it a step further, ALL your test results with limit or stop orders are invalid. It is because you are only using bid data to evaluate your strategy. Quick example: Assume the bid hits your buy limit, but the ask doesn't. Your strategy will show a fill, but not the real world. Think about this for awhile - it is a critical point. SUPER critical.

3. Crosses above and under should work. For a cross above to be triggered, it has to cross below the same line. The logic will need to be different if you want to ensure long - short - long - short.

If you have any questions please send me a Private Message or use the futures.io "Ask Me Anything" thread
Reply With Quote
 
  #10 (permalink)
Market Wizard
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,388 since Jul 2012
Thanks: 1,138 given, 4,387 received
Forum Reputation: Legendary


Because of the reason I describe in point 2 above, when I do Forex development, I ONLY use market orders. No stop orders, no limit orders.

Of course, I work in Tradestation. Multicharts has an option to test with both bid and ask data, so limits and stops are probably OK there. I am not sure of Ninja.

If you have any questions please send me a Private Message or use the futures.io "Ask Me Anything" thread
Reply With Quote

Reply



futures io > > > > > Avoiding re-entries

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
Speeding up an Optimization by Avoiding Settings stepseazy NinjaTrader Programming 8 September 5th, 2014 08:56 AM
Avoiding trading loop in script mcteague NinjaTrader Programming 5 December 28th, 2012 03:18 AM
'Let's Just Do It,' Dimon Says of Avoiding 'Cliff' Quick Summary News and Current Events 0 December 12th, 2012 10:00 AM
S.E.C. Is Avoiding Tough Sanctions for Large Banks kbit News and Current Events 0 February 3rd, 2012 10:00 AM
Avoiding Secondhand Trading Psychology Anagami Psychology and Money Management 3 March 28th, 2011 12:28 PM


All times are GMT -4. The time now is 11:06 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-13 in 0.14 seconds with 20 queries on phoenix via your IP 54.227.51.103