Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.
flyingdutchmen
Members-
Content Count
114 -
Joined
-
Last visited
Content Type
Profiles
Forums
Calendar
Articles
Everything posted by flyingdutchmen
-
Making consistent returns daytrading the ES is a lot harder than most think... in fact it might be the hardest game in town but for some reason it's what the mayority of internet forum readers want to do. maybe it's partially about being a badass ("I'm an S&P trader") but it's much harder than trading has to be. The S&P futures are usually one of the most random and noisy markets out there.
-
using a simple litle function in tradestation you are able to convert ticks to any timeframe you wish, eliminating the fact that you must use 2 or more charts with different tf's in order to gather data from multiple tf's. all can be done within the tickchart
-
EL Help on Pausing Any Further Entries on a Bar
flyingdutchmen replied to raybackreedy's topic in Coding Forum
what you could do, is to write your skript on 1 ticks, you will need a function to convert the single ticks to one minute bars so you can keep using timeframe based indikators. this is fairly easy and this way you will not have to wait a full minute before you can re-enter the next trade. this option is available but i recommend it only if you do not need long history for backtesting and stuff. once you know you have a valid strategy which works for you, and you do need timeframe based calculations this is the way i would go. it will decrease your waiting from a minute to a tick, will that do? -
there are plenty people here who are familiar with el, meself included. it would be helpfull if you would give some details about what you are trying to archieve.
-
Rounding Print-statement to Full Number
flyingdutchmen replied to flyingdutchmen's topic in Coding Forum
well, by being able to export the data in a format which can be imported by TS without further modifications, i am able to plot constant range bars from tick-data, at least for the visual part. from here i would be able to use further calculations onto those range bars like finding swing high's/low's which wasnt possible in TS, at least not standard. timebased swing highs and low do not have the same quality. this is just a workaround. It filters out alot of noise and give me more quality swings. i did not like the MC rangebars so i made my own in TS which do fit my conditions -
Constant RangeBars for TradeStation
-
Rounding Print-statement to Full Number
flyingdutchmen replied to flyingdutchmen's topic in Coding Forum
Outcome: Constant RangeBars for TradeStation, Been done before ? -
Rounding Print-statement to Full Number
flyingdutchmen replied to flyingdutchmen's topic in Coding Forum
Exactly what i needet Tams, Thank you -
I am aware there allready is an active tread about rounding numbers but it is not working for me, i am facing somewhat the same problem when printing a to a TXT-file, this solution rounding to price does not work for me as am im trying to round time or any number not correlated to price in a text file i am trying to make tradestation to manipulate the price of a certain underlying and print the full numbers incl Hour and Minute in a text file so they can later be imported as 3d party ascii data without needing to do some workaround with open office example... Variables: myvalue(0); myvalue = mavalue + 1; Print(File("c:\TradeStationDataExport\TS_Data.txt"), myvalue); the text file will allways be filled with 2 decimals behind the number myvalue Output in TXT File: 1.00 2.00 3.00 Needet: 1 2 3 i have tried pretty much all rounding functions (and ofcourse the simple Round reserved word) i could get my hands on and i made up some myself, unfortunally this seems not to work while printing data to an TXT-file. Thoughts ?
-
I Don't Understand the Code for the Hull Moving Average
flyingdutchmen replied to ajhunter's topic in Coding Forum
a possible solution to being able to tell what price it will need in order to change direction is to stick it in a loop and let it find out itself. i am not sure what you are trying to achieve, if for example your indikator, which in this case is the hull ma is pointing up and you would want to know how much price should move down in order to make your indikator go down or cross below some fix point whithout knowing or needing to know the exact calculations it shouldnt be to hard to find out. stick the calculation in a loop and let it loop trough untill your disired outcome is calculated, this will then be the price you will need to achieve the theoretical change in the indikator you would like to see. but then again, imho it is not very helpfull to use an indikator from which one does not know on which formula's it is based. if you need help let me know this should not be very hard to realize, im not sure if it is what you are trying to achieve here -
the idea of this litle script is that on each bar it will take the current value and the value of n bars back and by the difference over those n bars it will create a "virtual" and "straight" line from your MA n bars back to the MA of currentbar and then messure the difference from the MA to that virtual line. if the difference is greather that the virtual line incl the tollerance on of those bars the counter will never be equal to n, therefore condition will stay set to false.all bars must stay within this tollerance in order to set the counter equal to n
-
i still owe you an anser on this one, sorry it took me a while to reply. you where asking for an easy and fast way to check if your slope is within tollerance, here is a small script which you could save as a false/true function if it is what you are searching for. read the examples i have wrote in the brackets.this skript may be a bit hard to understand at first but it is pretty logical and simple. it uses a 50-period sma to be your line and calculates the difference between the value of the current bar and n bars back dividet by n, this gives the value each bar should go up or down to meet your creteria and will be used to check all other bars within a loop inputs: n(5), toll(.5);{tollerance in percent of difference} variables: result(0), diff(0), index(0), counter(0); result = average(close,50);{something we will use as a line} diff = absvalue(result-result[n]) / n;{absolute difference between current value and value n bars back devidet by n} counter = 0;{set counter to zero} if result > result[n] then begin{first loopblock in case of current value being higher same value n bars back, second block visa versa} for index = n-1 downto 0 begin if result[index] >= result[n] + ((n-index)*diff) - (toll*diff) and{make sure each bar coming in after n is higher but not higher then the tollerance} result[index] <= result[n] + ((n-index)*diff) + (toll*diff){make sure each bar coming in after n is lower but not lower then the tollerance} then counter = counter + 1;{counting in case of succes} end; end else for index = n-1 downto 0 begin if result[index] <= result[n] - ((n-index)*diff) + (toll*diff) and result[index] >= result[n] - ((n-index)*diff) - (toll*diff) then counter = counter + 1; end; condition1 = counter = n;{if succesfull counter should be equal to n after having all bars calculated} if condition1 then plot1( result );{show if succesfull} in case of a sideways market the statement (toll*diff) could be a bit to narrow because the difference between current value and the value of n bars back is nihil, and therefore give less signals. this you could change by (toll*value[index+1] to give more signals in case of a "straight" slope in a sideways market. it will take a percentage of the value 1 bar ago within the calcuation of the loop, adapt the input to it.
-
sorry i didnt get to it yet. have fun with MC, must be a great software from what i hear about it
-
looks more like renko bricks
-
one way which comes to mind would be to calcuate the procentual difference between the line and its liniear regression line over the n amount of bars, another way to calcuate the angle of the slope and the difference between the slope of current bar and 1 bar back over the n amount of bars.i am in the midle of some other things at this very moment but i will try to give an easy language example soon
-
i do not have acces to that page, i am aware this is not ideal but i know it can be done because i allready have.
-
yes mc would be the perfect solution to ts, especially because they allow portfolio backtesting.i just kind of like things the hard way i guess, just trying to help someone
-
unfortunally they are just as vulnerable to timefactor as any other timeframe based candlestick, ha is simply another way of smoothing which is seen by many as finding "the perfect" candle within a given time. the idea of rangebars is to eleminate time from price which ha is not able to do.one can not trade time only price therefore the best way to smooth volatility is eleminate time
-
i could put something together but note they will be "virtual" range-bars, not suitable for viewing purposes.without any anhanced knowledge of el i am not sure if you could do something with this information as it will need some "fantasy".one could make a plotpaintbar statement in order to show them but because your price-data is running in a time-based chart it will look rather stupid.all you need is a input to determine the range you are willing to use and 4 arrays to store the ohlc values of the rangebars. once that is done one could call up the values and make simple statements like in any other timebased chart like If XClose[1] > XHigh[2] Then where XClose[1] would be the close of last closed rangebar and XHigh[2] the high of second last closed rangebar; from there you would have a basic to go on.
-
i surpose you are refering to straight as in not "choppy" and the line can be any value-line from price data to some kind of indicator line ?
-
another great contribution by Tams is anyone able to tell me if this dll concludes some array functions for dynamic arrays, i am still in search for a suitable dll for 2000i.this one unfortunally requires the import of ELD files which i am not able to do. or maybe someone here is familiar with a suitable dll for the old 2000i version. i have searched in various place but was not very lucky
- 10 replies
-
- ade
- elcollections
-
(and 3 more)
Tagged with:
-
URC - Free TradeStation EasyLanguage Functions
-
Nab, i am not sure how familiar yo are with EL but creating virtual range bars from ticks shouldnt be to hard. why dont you give it a try, i will assist.a rangebar is nothing more then a bar with a pre-defined range from high to low where the close is allways either the high of the bar or the low of the bar. it maybe not perfect and can not be used for very narrow ranges but im sure it can be done. give it a try and let me know how far you come, while you said you are willing to implement this in a system i assume you have some EL knowledge
-
EL: Get High of a Bar from a Specific Time Yesterday
flyingdutchmen replied to TraderFoo's topic in Coding Forum
there are various ways to make your script fully undependent of the barinterval in which your script is running, by example you could use the reserved word Sess1StartTime which would return 0930 wenn aplied to a stockchart tradet on the nyse. you can check the first bar of the day on an intraday chart with: if time = calctime(sess1startTime, barinterval) or the last bar of the day if time = calctime(sess1endTime, barinterval) the reason you are getting this entry on the next session is because you did not have any position on the prior day which makes it entriestoday(date)=0 then if your instrument gaps up you still have that order lying in the market from the last bar of the former session, this giving you the entry you do not wish. you could avoid this by NOT placing an entry on the last bar of the session, you may keep the order troughout the whole session but must remove it on the last bar, change your script to Variables: EP(0); If D <> D[1] Then EP = Open+500; If EntriesToday(Date) = 0 and and High < EP and Time < CalcTime(Sess1endTime,BarInterval) Then Buy Next Bar EP Stop; SetStopLoss(1000); If Time = Calctime(Sess1endTime,Barinterval) Then Sell next Bar at Market; and give it another try also try make a search in the help-files for the reserved words Sess1StartTime, Sess1EndTime, CalcTime it will clarify a bit more