help defining a trade rule with excel - Sierra Chart Programming | futures io social day trading
futures io futures trading


help defining a trade rule with excel
Updated: Views / Replies:3,043 / 10
Created: by ALFASSY 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
 

help defining a trade rule with excel

  #1 (permalink)
Trading Apprentice
HAIFA ISRAEL
 
Futures Experience: Beginner
Platform: SIERRA CHART
Favorite Futures: S&P 500
 
Posts: 12 since May 2011
Thanks: 8 given, 1 received

help defining a trade rule with excel

For weeks I am trying to define the last thing in my automated trading system.
I use sierra chart and my trading system is based on excel.
My strategy is based on market tension and is trying to predict market corrections.
There is a rule that if the price came 0.25 - 0.5 points from a pivot point, didn't touch the pivot and a market correction at the size of 2 points or more occurred I will not go into position using this specific pivot point. But if after the correction - the price got 5 points away from the pivot and 15 minutes have passed since the correction took place I can use the pivot again.
How can I define something like this? : \
can macros help me? How?
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)
Elite Member
San Jose, CA
 
Futures Experience: Intermediate
Platform: Sierra Chart
Broker/Data: IB/IQFeed
Favorite Futures: Futures
 
Posts: 110 since Jan 2011
Thanks: 54 given, 89 received


I'm no expert, but here are some thoughts on how to approach...

I think you need each condition to be persistent and able to be reset.

Lets say your pivot point cell is named PP and your reset cell is named RESET and last price cell is named LAST, and your condition for closer than .5 is named CONDITION1.

so maybe this could go into cell CONDITION1

=IF(AND(ABS(PP-LAST<.5),RESET=0),1,IF(RESET=1,0,CONDITION1))

This cell would then go to 1 or True once price came within .5 and would stay that way until reset by changing RESET cell to 1.

You could do something similar for all your other conditions and the reset condition and make a formula for your trade entry based on the whole series of conditions.

Hope that helps.

Reply With Quote
The following user says Thank You to Jolew for this post:
 
  #4 (permalink)
Trading Apprentice
HAIFA ISRAEL
 
Futures Experience: Beginner
Platform: SIERRA CHART
Favorite Futures: S&P 500
 
Posts: 12 since May 2011
Thanks: 8 given, 1 received

first of all, thank you very much for your help
what exactly is a reset cell? sorry for my lack of knowledge

Reply With Quote
 
  #5 (permalink)
Elite Member
San Jose, CA
 
Futures Experience: Intermediate
Platform: Sierra Chart
Broker/Data: IB/IQFeed
Favorite Futures: Futures
 
Posts: 110 since Jan 2011
Thanks: 54 given, 89 received

I meant just another cell that you use to reset the condition. In this case, the cell could contain a formula which was true if price was greater than 5 points away for more than 15 minutes.

You can just use regular cell references, I just wrote the formula with named cells for clarity. See workbook explorer for using defined names.

I just realized you need a way to capture the time to compare for 15 minutes.

You can probably just make a cell that puts the current time if within a certain range of the PP.

Something like

=IF(AND(ABS(PP-LAST<2),RESET=0),NOW(),IF(RESET=1,0,TIMECELL))

I guess you could also try to put the entire formula in one cell, but that will be a very long formula and will be difficult to debug.

Reply With Quote
The following user says Thank You to Jolew for this post:
 
  #6 (permalink)
Trading Apprentice
HAIFA ISRAEL
 
Futures Experience: Beginner
Platform: SIERRA CHART
Favorite Futures: S&P 500
 
Posts: 12 since May 2011
Thanks: 8 given, 1 received

Again thank you for your help! I really appreciate that!
my problem is how to define the time sequence of the occurrences
i want to go into position when the market price touch the pivot point
how can i write a function that become true if the market price touch the pivot point and if there was a market correction as i explained on my first message.
meaning: right now the price touch the pivot point, before that the price was 5 points away from the pivot point, before them both the price was 0.25 -0.5 points away from the pivot point.
how do i define in the function what came first to what?

Reply With Quote
 
  #7 (permalink)
Market Wizard
Bangkok
 
Futures Experience: Intermediate
Platform: MultiCharts.NET, S5, Ninj
Broker/Data: AMP, S5, IB
Favorite Futures: ES
 
DionysusToast's Avatar
 
Posts: 2,673 since Nov 2010
Thanks: 777 given, 8,742 received
Forum Reputation: Legendary

Excel is really a terrible tool for this.

Go to Ninja web page, find a broker partner, ask for a free trial.

Then, for zero cost you will have a tool that will allow you to backtest your rules.

Note - I am 41 and have been programming since I was 13. Excel will take much, much longer to test anything like this and the output of the testing results will be very poor. Also, by the nature of how you'll load the data, testing that involves smaller targets is virtually useless.

Reply With Quote
The following user says Thank You to DionysusToast for this post:
 
  #8 (permalink)
Elite Member
San Jose, CA
 
Futures Experience: Intermediate
Platform: Sierra Chart
Broker/Data: IB/IQFeed
Favorite Futures: Futures
 
Posts: 110 since Jan 2011
Thanks: 54 given, 89 received

When you write your conditions, you can check for the previous condition. Here is an example of how it might work. Not sure if these are the exact conditions, but something like this. Each condition would be a separate cell.

Condition 1:

Price within .5 of PP and condition 4 false

Condition 2:

Price > .25 from PP and Condition 1 True and condition 4 false

Condition 3:

Price > 2 from PP and Condition 1 and 2 true and condition 4 false

Condition 4:

Price > 5 from PP for 15 minutes and Condition 1,2, and 3 True. This should reset all the conditions back to initial state.


Dionysus,

This excel method is a prototyping tool with Sierra. Just enter a formula and go. There is also a C++ interface. They both backtest easily. Actually, either for trying things out quickly or for someone that doesn't program it is a pretty cool feature.

His problem here is defining the same logic that is needed to program this. I don't see how Excel makes it any more difficult.

Reply With Quote
The following user says Thank You to Jolew for this post:
 
  #9 (permalink)
Trading Apprentice
HAIFA ISRAEL
 
Futures Experience: Beginner
Platform: SIERRA CHART
Favorite Futures: S&P 500
 
Posts: 12 since May 2011
Thanks: 8 given, 1 received

hi jolew!
first of all thanks a lot for your help!!!!!!!!!!!!!
I put this trading rule aside for the last weeks and now i am back on it.
i used something very simillar to what you suggested using excel state lock.
this is what i have done: AC3 is my pivot point. i used cell H5,H6,H8 - all are non advancing cells.

H5 - will become and remain true when the market came 0.5 points close to the pivot. and H8 is it's reset cell.
=AND(OR(E3=AC3+0.5,H5=TRUE),H8=FALSE)

H6 - will become and remain true if the market price equals the pivot point plus 2.5 points and if H5 is true. and H8 is it's reset cell.
=AND(OR(AND(H5=TRUE,E3=AC3+2.5),H6=TRUE),H8=FALSE)

H8 - is the reset cell for H5 and H6 will reset H5 and H6 to false if the market will equal the pivot point plus 5 points

=E3=AC3+5

this 3 formulas gives me the series of events. my LAST problem is: i need to be able to check if from the moment H5 first become true until i will make an entry(E3=AC3) 15 minutes have passed.
my time values are in column A. i was able to get the time but i can't seem to manage to lock the time cell. is there a way to lock the time cell to this specific time? or is it only able to lock a cell to "TRUE"?
Is there a way you can think of that will help me get time?

Thanks a lot for your help!! it is really apreciated!!

Reply With Quote
 
  #10 (permalink)
Trading Apprentice
HAIFA ISRAEL
 
Futures Experience: Beginner
Platform: SIERRA CHART
Favorite Futures: S&P 500
 
Posts: 12 since May 2011
Thanks: 8 given, 1 received


Hi again
I used the match index function to get the time when the market price first touched the pivot +0.5 and it worked but i have a little question.

this is what i have done:ac3 is the pivot
y3 =AND($J$41-INT($J$41)>TIMEVALUE("16:30:00"),OR(CROSSFROMABOVE(E3:E4,AC3+0.5),CROSSFROMBELOW(E3:E4,AC3+0.5)))
h13=INDEX(A3:A30,MATCH(TRUE,Y3:Y30,FALSE),1)
a30 because i use 15 min bars chart and i only need the last 6 hours

h13 gave me the time of the last crossover in the range(a12). but i want the time of the first crossover in the range(a18). how can i get that??

another question: because i use 15 min bars chart, when h13 gives me a time i don't know where inside that 15 minutes it happened. how can i get a more accurate time??? my idea is opening another chart of 1 minute bars and then my offset will be less then a minute, which is acceptable. do you have a better idea?

thank a lot in advance!! have a nice day!

Reply With Quote

Reply



futures io > > > > > help defining a trade rule with excel

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
Computers rule Wall Street kbit News and Current Events 0 August 14th, 2011 01:04 AM
Phone Scandal Poses Defining Test for a Murdoch Son Quick Summary News and Current Events 0 July 9th, 2011 10:30 AM
The Rule of 70 worldwary Trading Journals 56 March 31st, 2011 03:54 PM
Defining the range where the bulk of the session's price action could take place trendisyourfriend The Elite Circle 2 September 15th, 2010 01:19 PM


All times are GMT -4. The time now is 06:42 PM.

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.14 seconds with 19 queries on phoenix via your IP 54.145.16.43