Retrace before reentry? - EasyLanguage Programming | futures io social day trading
futures io futures trading


Retrace before reentry?
Updated: Views / Replies:879 / 14
Created: by jrh059 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
 

Retrace before reentry?

  #1 (permalink)
Denver CO
 
 
Posts: 6 since Jul 2014
Thanks: 3 given, 0 received

Retrace before reentry?

I've been stuck on this problem for awhile and wondering if there is a simple solution.

I am using SetStopLoss to exit a position (say 20 ticks) but only want to re-enter a position if price has gone against the original entry price by at least 40 ticks at some point between my SetStopLoss exit and the next entry.

any suggestions?

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)
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Trading Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 2,083 since Apr 2013
Thanks: 372 given, 1,334 received


jrh059,

we could try to point you in the right direction when you post the code you are stuck with.
One idea would be using a flag that you use to only allow another entry in case the market moved X points higher than your exit price.

Regards,

ABCTG

Follow me on Twitter Visit my Facebook Reply With Quote
 
  #4 (permalink)
Legendary Market Wizard
Houston, TX
 
Trading Experience: Advanced
Platform: XTrader
Broker/Data: Advantage Futures
Favorite Futures: Energy
 
Posts: 3,005 since Dec 2013
Thanks: 2,440 given, 5,395 received

Maybe a noob question @ABCTG but how do you know what your exit price was?

Reply With Quote
 
  #5 (permalink)
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Trading Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 2,083 since Apr 2013
Thanks: 372 given, 1,334 received

@SMCJB,

you can access the exit price via the reserved word ExitPrice. This will work fine, unless you scale in and out of positions. In this case you can access the respective prices using the StrategyHost class.

Regards,

ABCTG

Follow me on Twitter Visit my Facebook Reply With Quote
The following 2 users say Thank You to ABCTG for this post:
 
  #6 (permalink)
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Trading Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 2,083 since Apr 2013
Thanks: 372 given, 1,334 received

The same way the entry price is accessible via the reserved word EntryPrice. @jrh059 you can use this to only allow a new entry when you are flat and if the current price is X ticks above the last entry price.

Regards,

ABCTG

Follow me on Twitter Visit my Facebook Reply With Quote
 
  #7 (permalink)
Denver CO
 
 
Posts: 6 since Jul 2014
Thanks: 3 given, 0 received

Thank you for your response.

To clear up any confusion, once I am stopped out of a long position, I want price to go LOWER than where I was stopped out before taking another entry.

The code I am currently trying is as follows:

Var:
bool LongFalseStop(False);

If ExitPrice(1)<=EntryPrice(1)-.20 and Lowest(Low,BarsSinceExit(1))<=EntryPrice(1)-.40 then
LongFalseStop=True;

If LongFalseStop=True then Buy

Using the print function, I can tell that this should work but the problem is that I can't figure out how to initiate the first entry without setting the LongFalseStop Variable to TRUE in the beginning, at which point the code doesnt work.

Reply With Quote
 
  #8 (permalink)
Legendary Market Wizard
Houston, TX
 
Trading Experience: Advanced
Platform: XTrader
Broker/Data: Advantage Futures
Favorite Futures: Energy
 
Posts: 3,005 since Dec 2013
Thanks: 2,440 given, 5,395 received

entryprice is zero until you have your first trade

 
Code
Var:
   bool LongFalseStop(False);

if entryprice = 0 then
   first trade condition
else begin
   If ExitPrice(1)<=EntryPrice(1)-.20 and Lowest(Low,BarsSinceExit(1))<=EntryPrice(1)-.40 then LongFalseStop=True;
   If LongFalseStop=True then Buy
end;

Reply With Quote
The following user says Thank You to SMCJB for this post:
 
  #9 (permalink)
Denver CO
 
 
Posts: 6 since Jul 2014
Thanks: 3 given, 0 received

Thank you! That did work. However, now it seems that the LongFalseStop stays True for every bar following the first bar that it is True, making it ineffective because there is never a False condition. Is there a way to make it reset or reevaluate each bar?

Reply With Quote
 
  #10 (permalink)
Legendary Market Wizard
Houston, TX
 
Trading Experience: Advanced
Platform: XTrader
Broker/Data: Advantage Futures
Favorite Futures: Energy
 
Posts: 3,005 since Dec 2013
Thanks: 2,440 given, 5,395 received


Just set it to false on every bar or my preference is to

 
Code
If ( (ExitPrice(1) <= EntryPrice(1) - 0.20) and (Lowest(Low, BarsSinceExit(1)) <= EntryPrice(1) - 0.40) ) then
   LongFalseStop = True else LongFalseStop = False;

Reply With Quote

Reply



futures io > > > > > Retrace before reentry?

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

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
 

Show us your trading desks and win over $5,000 in prizes w/Jigsaw Trading

September
 

The Spirituality of Trading w/Dr Brett Steenbarger

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Separate plot for Evening Session for Fibonacci Auto Retrace and others rmfj Sierra Chart Programming 6 January 4th, 2017 02:39 PM
Simple retrace strategy Linds Elite Automated Trading 2 December 23rd, 2011 09:49 PM


All times are GMT -4. The time now is 11:24 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