|
|
|
|
|||||||
| Coding Forum Collaborate, receive help, or discuss coding related issues. |
![]() |
| Bookmarks | |||||||
del.icio.us
|
StumbleUpon
|
Google
|
Digg
|
Facebook
|
Furl
|
Reddit
|
Netscape
|
|
|
LinkBack | Thread Tools | Display Modes | Language |
|
|||||||||||||||
|
Re: Easylanguage and Script Help
Blu-Ray, you've got my vote for the saint of the week
![]() Note to Soultrader, please consider a poll for the most helpful member of the week/month and the most thankful member as well. I think it will promote civility even more than the high standards we already have here at TL. Here is an attempt at BR's coded strategy for darknite on two data series: Unfortunately, I think the price action that darknite posted is usually a little bullish and the strategy is usually in the red (note the time frame for $NDX.X is reduced to 15 min to reduce the number of trades. You will also need realtime subscription to both symbols. Workspace and strategy eld in zip file, for 8.3.1419 and above : ![]()
|
|||||||||||||||
| The Following 2 Users Say Thank You to thrunner For This Useful Post: | ||
Blu-Ray (03-28-2008), darknite999 (03-28-2008) | ||
|
||||
|
Re: Easylanguage and Script Help
Great idea thrunner. Always wanted to do something like it but was never sure of the format of things. I will get to work on it.
__________________
James Lee Email: JamesLee@traderslaborator y.com Skype: james.lee03 TradersLaboratory.com |
|
|||
|
Re: Easylanguage and Script Help
Wow!
Thanks so much! I now only have one problem. For some reason when using the showme all the points it plots are correct but when using the strategy it only show about 80% of the trades that it should do. Is there something wrong? Is it possible that I can buy back 30 ticks below the entry on the same bar (if the low goes down that far) if not then the 1st bar that the low gets low enough to buy back at 30 ticks below the entry? One final thing (I think ) How do I change to script so it won't sell anything when there is 1 hour till closing and then start again the next morning? (To prevent holding trades when the market has closed)Blu-Ray - I have to hand it to you and everyone else that has been helping me. I appreciated it so much. You don't understand the stress it was causing me that no one could help me. Then I found this forum ![]() Cheers, Darknite. Last edited by darknite999; 03-28-2008 at 07:42 AM. |
|
|||||||||||||||
|
Re: Easylanguage and Script Help
Here's the revised code with an endtime added as an input: Inputs: ProfTarget(30),StopLoss(1 ),endtime(1900); Vars: ShortEntry(0), Permission(0), Mintick(0), mystop(0), MP(0); MP = marketposition; Mintick = minmove/pricescale; Condition1 = C[1] data2 >C[2] data2 and H data2 > H [1]data2 and H data2 > H[2] data2 and C data2 < O data2; if condition1 and MP = 0 and time < endtime then begin ShortEntry = Low - (1*mintick); mystop = High + (Stoploss*mintick); permission = 1; end; if permission = 1 then begin SellShort next bar at ShortEntry Stop; Permission = 0; end; if mp = -1 then begin buytocover ("ProfitTarget") next bar at ShortEntry - (ProfTarget*mintick) limit; buytocover ("StoppedOut") next bar at mystop stop; end; Also add either of these two lines to the end of the code.... This one will close your position if you've got an open position and it's after the endtime. Note: It will close the position whether it's in profit or loss. if mp = -1 and time > endtime then buytocover next bar at market; Or the second one will set the exit on the close of the session, again whether it's in profit or loss. ( But note this should only be used on historical simulations, as depending on the instrument it can lead to your exit being taken on the open of the next day) if mp = -1 and time > endtime then setexitonclose; Hope this helps Blu-Ray
__________________
Remember - Take the path of least resistance. |
|||||||||||||||
|
|||||||||||||||
|
Re: Easylanguage and Script Help
if mp = -1 then begin buytocover ("ProfitTarget") next bar at ShortEntry - (ProfTarget*mintick) limit; buytocover ("StoppedOut") next bar at mystop stop; end; and the add this to the bottom of the script: setprofittarget( x ); Note: the profit target is now in dollar amount rather than number of ticks. Cheers Blu-Ray
__________________
Remember - Take the path of least resistance. |
|||||||||||||||
|
|||
|
Re: Easylanguage and Script Help
Thanks,
Is it possible I could do it a different way. Instead of looking for the pattern on data2 I look for the pattern on data1 and trade on data2? Cheers, Datknite. |
|
|||
|
Re: Easylanguage and Script Help
And I'm not completely sure if you understood what I meant (probably because of my terrible english but anyway :P )
I mean that once the entry has taken place it sells 30 ticks below the entry the 1st chance it gets. If it is the same bar that has made the profit target of 30 ticks or 2 bars along it will buytocover the 1st chance it gets. (providing the stoploss hasen't bought back anyway) Once again much thanks, Darknite. |
|
|||||||||||||||
|
Re: Easylanguage and Script Help
Yes i know what you mean, Here's a chart with your strategy ( data1 only ) using the " SetProfittarget ". ![]()
__________________
Remember - Take the path of least resistance. |
|||||||||||||||
|
|||||||||||||||
|
Re: Easylanguage and Script Help
Cheers Blu-Ray
__________________
Remember - Take the path of least resistance. |
|||||||||||||||
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MBT FX Trading Performance Script | Sparrow | Coding Forum | 3 | 03-06-2008 07:12 AM |
| Searching TTM Scalper Indicator Script for QuoteTracker | ray112 | Coding Forum | 0 | 02-06-2008 05:51 AM |
| Some EasyLanguage Help Please | jjthetrader | Coding Forum | 4 | 10-14-2007 07:34 PM |
| Chat Script from Nov. 7, 2006 on Forex Trading | Soultrader | Chat Room Scripts | 0 | 11-07-2006 02:28 PM |
| Antonio: Please help me on MP for easylanguage | nasdaq5048 | Market ProfileŽ | 12 | 10-31-2006 05:53 PM |