----------------------------------------------------------------------------------------------------------------------------------- The hardcore programmer types find it woefully limited and simplistic. Can't satisfy everyone. As a total amateur when it comes to programming, I find EL kind of fun, and, so far at least, more than adequate for my trading purposes - though I do wish they'd integrate it further with the Order Bar and Account Manager... so you could call any order type from within EL (especially Stop Limit, but others including routing options and advanced features as well), and also so you could run any EL stop off any REAL entry. ------------------------------------------------------------------------------------------------------------------------------------- at least i agree with u,kymar. but im one of those programmers(not for EL) and i also see it as a very easy way to define entries and exits..... but there is a big gap: u cant see your portfolio in a strategy if the stock was not bought by this certain strategy. and in case of disconnecting, your strategy doesnt hit.. u hit by yourself...your strategy doesnt know. (maybe this gap is closed and i dont know. fact is, i found nothing about it and all my test didnt find it also) if that gap would be closed, there is nothing i would say against easy language. (i dont anyway)
Kymar, you are right, it definitely wasn't in the EL manual when I was learning EL. I found it in Ch. Wright's book: "Trading As A Business" that Omega sent me some time ago, it was in one of his sample codes. Thanks for your detailed explanation, I agree that in most cases, it's better to establish triggers at the close of current bar for execution on subsequent bars.
hi snosure, just use this way: if marketposition <> 0 then begin sell xyz ..... end; marketposition=1 means long, -1 means short
Lippi's solution will prevent you from immediately re-entering on the next bar after position is closed by the trailing stop (presuming stock is still above the HOD), and is worth noting - not least because it will be sufficient for other signals and in other situations to prevent immediate re-entry - but it won't stop you from re-entering on the bar right after. You need a "flag" or some other on/off condition. ************************************************ {BUY/SELL AT NEW HOD/LOD; TRY JUST ONCE} VARS: BBUY(0), SSELL(0), CUTOFF(0), OKTOBUY(FALSE), OKTOSELL(FALSE); CUTOFF = sess1starttime + 30; If time <= CUTOFF then begin BBUY = IDHIGH; {OR WHATEVER FUNCTION OR ROUTINE YOU'USING TO ID the DAY's HIGH} SSELL = IDLOW; {OR WHATEVER FUNCTION OR ROUTINE YOU'USING TO ID the DAY's LOW} {RE-SET OKTOENTER FOR NEW SESSION} OKTOBUY = TRUE; OKTOSELL = TRUE; end; {PRECUTOFF (helpful to keep "end"'s identified/organized as signal grows more complicated)} {TURN OFF SIGNAL IF BUY OR SELL CONDITION HAS ALREADY BEEN MET} If time >= CUTOFF and time < sess1endtime then begin {DISALLOW RE-BUYS, RE-SELLS} If H > BBUY then OKTOBUY = FALSE; If L < SSELL then OKTOSELL = FALSE; If OKTOBUY = TRUE then buy next bar at BBUY stop; If OKTOSELL = TRUE then sell short next bar at SSELL stop; end; {POSTCUTOFF} {could also delete this section and instead combine signal with "close at end of day" signal} If time = sess1endtime then begin sell this bar on close; buy to cover this bar on close; end; {END OF DAY} *********************************************** Say you saved the initial version as _30MIN BO 1.00, You could save/verify this one as _30MIN BO 1.01 So, that should give you just one chance to enter long or short each day. If you want something more complex (possibly re-enter long if price has passed back below since last in market, etc.), then you'll need a signal that's more complex, but probably based on the same or similar methods. Checking the strategy performance report, I was suddenly reminded how much there can be in this simple entry concept, all things considered. Let me know how it works for you!
snosure, kymar is right and my code was meant to turn off multiple sell commands for a closed position. if u want to enter a trade just once a day you can add the following code to your buy command: condition1= ... your buying conditions... if entrydate(1) <> date and condition1 then buy next bar... it looks a bit easier to understand.
Thanks to everyone again. The codes suggested worked great. I heard it is difficult to get good results testing intra-day systems and now I know why. I tested back 300 days and literally looked at nearly every day. There were many times that faulty data(high/low spikes) put me in or took me out of a trade. Something, that when really trading,I wouldn't have done. There is also no way to test for the intuition of the trader!! Sometimes you just know that the trade is no good and pass. Have either of you had much success testing intra-day systems? Or is there a filter you can use to block out the spikes? Thanks again, snosur4
Are you using the TS6 and TS data? The free data provided from Historybank.com (for 2000i and Omera Research-era software) seemed dirty and gappy enough to make a lot of intrady testing close to pointless, but the TS6 data has always seemed relatively good to me. You could try a filter that ignores the signal or data point if it's more than a certain percentage higher/lower than the immediately preceding data points. Sometimes that helps a bit. In general, I've had great success testing intraday systems - but a mostly miserable experience actually trading them. Part of the problem, may have had to do with my limitations as a programmer, part of it with the limitations of my software and hardware, part of it with being psychologically unsuited to system-trading, part of it with growing skepticism about the whole enterprise. I do think I learned a lot from it, however. I eventually switched to a discretionary (though still more or less "systematic") method, and use system testing fairly infrequently, pretty much only to test particular ideas to get a rough idea of how much of an "edge" they might offer. These days, I use EL mainly to help with my discretionary trading - for custom indicators and historical analysis, or for signals that produce "ready-to-go" orders.
is there a way in easy language to completly automate(don't have to confirm) your trading using certain condition and indicators.
You can automate your strategies in the "Format Strategy" sub menu of TS6. But don't think you can turn on your computer and go out for the day. While the computer will do most of the heavy lifting, you have to be around for when something goes wrong (interrupted data feed, etc.).