|
|
|
|
|||||||
| 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
oki doki
![]() Cheers, i'll send it to you in about 15 mins... just need to type it alllllllllll out ![]() ignore the last message I forgot to refresh (F5) :P Thanks, Darknite. |
|
||||
|
Re: Easylanguage and Script Help
Darknite
Here's the code you require but it has an error in it that I can seem to get rid of at the moment. As you'll see in the charts below, first one is great with entry and exits perfect, but then on the second chart, it seems to fire off an order on a second bar if the first bar had entry & profit target all within the same bar. ![]() All I can say is try it out and let me know how you get on. Inputs: ProfTarget(30),StopLoss(2 ),endtime(2000); Vars: ShortEntry(0), Permission(0), Mintick(0), mystop(0), MP(0); MP = marketposition; Mintick = minmove/pricescale; Condition1 = C[1] data3 >C[2] data3 and H data3 > H [1]data3 and H data3 > H[2] data3 and C data3 < O data3; if condition1 and MP = 0 and time < endtime then begin ShortEntry = Low of data2 - (1*mintick); mystop = High of data2 + (Stoploss*mintick); permission = 1; end; if permission = 1 and mro(mp=-1,7,1) = -1 then begin SellShort next bar at ShortEntry Stop; Permission = 0; end; if permission[2] = 1 then permission = 0; if mp = -1 then begin buytocover ("StoppedOut") next bar at mystop stop; end; if mp = -1 and time > endtime then setexitonclose; setprofittarget( ProfTarget ); ![]() ![]() ( Note: Set up your chart like in the pics above, 5 min of stock on data1, 30 min of stock on data2 and $INDU on data3 ) Cheers Blu-Ray
__________________
Remember - Take the path of least resistance. |
| The Following User Says Thank You to Blu-Ray For This Useful Post: | ||
darknite999 (04-02-2008) | ||
|
|||
|
Re: Easylanguage and Script Help
ok I think i've nearly sorted this out now (finally)
I think I only need to add one last bit of code in. That would be only 1 trade maximum between every natural hour is allowed. So for more depth: If there is a setup and it sells short once it has made it's profittarget of 30 ticks it buys to cover. A new trade can not be initiated until the natural hour is up. For example if it sells short at the time of 13:08 and buys to cover at: 13:59 - it can make a new trade at 14:00 or 14:01 - it can only make a new trade ar 15:00 Thanks, Darknite. |
|
||||
|
Re: Easylanguage and Script Help
Darknite
Yes it's do-able, but I'm away now for a week, so I'll look into it when I get back, unless someone else sorts it out in the meantime. Cheers Blu-Ray
__________________
Remember - Take the path of least resistance. |
|
||||
|
Re: Easylanguage and Script Help
Darknite
Give this a try: Inputs: ProfTarget(30),StopLoss(2 ),endtime(2000); Vars: ShortEntry(0), Permission(0), Mintick(0), mystop(0), MP(0); MP = marketposition; Mintick = minmove/pricescale; Condition1 = C[1] data3 >C[2] data3 and H data3 > H [1]data3 and H data3 > H[2] data3 and C data3 < O data3; if condition1 and MP = 0 and time < endtime and permission = 0 then begin ShortEntry = Low of data2 - (1*mintick); mystop = High of data2 + (Stoploss*mintick); permission = 1; end; if permission = 1 and mro(mp=-1,7,1) = -1 then begin SellShort next bar at ShortEntry Stop; Permission = 2; end; if permission = 2 and mod(t,100)=0 and mp <> 0 then permission = 2; if permission = 2 and mod(t,100)=0 and mp = 0 then permission = 0; if mp = -1 then begin buytocover ("StoppedOut") next bar at mystop stop; end; if mp = -1 and time > endtime then setexitonclose; setprofittarget( ProfTarget ); 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 |