Go Back   Traders Laboratory > Trading Resources > Trading Indicators > Coding Forum

Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Bookmarks
del.icio.us StumbleUpon Google Digg Facebook Furl Reddit Netscape

 
LinkBack Thread Tools Display Modes Language
  #1 (permalink)  
Old 03-25-2008, 03:24 PM
darknite999 darknite999 is offline
Registered Trader

 
Join Date: Mar 2008
Posts: 25
Thanks: 8
Thanked 0 Times in 0 Posts
Easylanguage and Script Help

Hello, (Apologies in advanced if I have posted this in the wrong place)

I'm new to easylanguage scripting and was wondering if someone could help me please.

I want to write a script that will show me, on an upward trend of 3 or more candlesticks, the highest high of that trend. The new high must be a red candelstick and the trend must contain at least one green candle.

How would I go about doing this please?

Thanks for you help in advanced,
Darknite.

Reply With Quote
  #2 (permalink)  
Old 03-25-2008, 04:44 PM
zdo zdo is offline
Registered Trader

 
Join Date: Nov 2007
Posts: 74
Thanks: 17
Thanked 12 Times in 8 Posts
Re: Easylanguage and Script Help

please spec out a little bit more about what you mean by
1 "upward trend".
is the lowest low >= 4 bars ago or
must the trend members lows all be higher than previous low or
_______ ???

thx

Reply With Quote
  #3 (permalink)  
Old 03-25-2008, 05:49 PM
darknite999 darknite999 is offline
Registered Trader

 
Join Date: Mar 2008
Posts: 25
Thanks: 8
Thanked 0 Times in 0 Posts
Re: Easylanguage and Script Help



I hope this sums it up

Once again thanks for your help it's much apreciated.

Cheers,
Darknite

Reply With Quote
  #4 (permalink)  
Old 03-26-2008, 09:24 AM
BlowFish's Avatar
BlowFish BlowFish is offline
Dullard

Trader Specs
 
Join Date: Mar 2007
Location: Europe Mostly
Posts: 615
Thanks: 20
Thanked 58 Times in 45 Posts
Re: Easylanguage and Script Help

IF C[1]>C[2] and c[2] > C[3] and C[3] > C [4] and H > H [1] and C < O then
plot1 (h+1,"High")
else
noplot1;

Set to plot a dot, it should plot over the high on bar close. You can but your own logic in quite simply. The number in square brackets [n] signifies n bars ago. Haven't tested it as I typed it straight into the post. I'm sure BlueRay wll correct it if I am wrong

Reply With Quote
The Following User Says Thank You to BlowFish For This Useful Post:
darknite999 (03-26-2008)
  #5 (permalink)  
Old 03-26-2008, 09:45 AM
Blu-Ray's Avatar
Blu-Ray Blu-Ray is offline
Premium Trader

Trader Specs
 
Join Date: Nov 2006
Location: England
Posts: 355
Thanks: 60
Thanked 19 Times in 14 Posts
Re: Easylanguage and Script Help

Quote:
View Post
IF C[1]>C[2] and c[2] > C[3] and C[3] > C [4] and H > H [1] and C < O then
plot1 (h+1,"High")
else
noplot1;

Set to plot a dot, it should plot over the high on bar close. You can but your own logic in quite simply. The number in square brackets [n] signifies n bars ago. Haven't tested it as I typed it straight into the post. I'm sure BlueRay wll correct it if I am wrong
hehehe....nice one Blowfish.

The only thing I would add to the line would be :

H > H[2] and H > H[3] and H > H[4]

Just incase one of the previous candles had a higher high leaving a long shadow. As with Blowfish, I've never tested it, but give it a try and let us know how you get on.

Cheers

Blu-Ray

__________________
Remember - Take the path of least resistance.
Reply With Quote
The Following User Says Thank You to Blu-Ray For This Useful Post:
darknite999 (03-26-2008)
  #6 (permalink)  
Old 03-26-2008, 12:55 PM
darknite999 darknite999 is offline
Registered Trader

 
Join Date: Mar 2008
Posts: 25
Thanks: 8
Thanked 0 Times in 0 Posts
Re: Easylanguage and Script Help

Great!!

It worked just about so I had a look through what you told me and made a few adjustments so instead it was this:

IF C[1]>C[2] and H > H [1] and H > H[2] and C < O then
plot1 (h+1,"High")
else
noplot(1);

How would I do this for a strategy please?

how do I add a stoploss and tell it to sell and buy back 30 points below...

Once again greatly apreciated and thanks for your help,
Darknite.

Reply With Quote
  #7 (permalink)  
Old 03-26-2008, 01:42 PM
BlowFish's Avatar
BlowFish BlowFish is offline
Dullard

Trader Specs
 
Join Date: Mar 2007
Location: Europe Mostly
Posts: 615
Thanks: 20
Thanked 58 Times in 45 Posts
Re: Easylanguage and Script Help

I have never used a strategy in TS so I will defer to BlueRay Hopefully will learn something too. There are a bunch of reserved words to buy sell etc. that I guess would go in instead of plot.

Easylanguage really is pretty easy (IMHO) and a bit of hands on will get you there in no time at all.

Perhaps look at one of the sample strategies to see how it hangs together. Im sure there must be one for a moving average Xover or something similar.

Be interested how it pans out for you.

Reply With Quote
The Following User Says Thank You to BlowFish For This Useful Post:
darknite999 (03-26-2008)
  #8 (permalink)  
Old 03-26-2008, 02:35 PM
darknite999 darknite999 is offline
Registered Trader

 
Join Date: Mar 2008
Posts: 25
Thanks: 8
Thanked 0 Times in 0 Posts
Re: Easylanguage and Script Help

Cheers,

If anyone else could help me please that would be brilliant

In the mean time i'll see if I can find a sample strategy that has those commands i'm looking for (haven't found so far and the websites on google are running out :P)

All I need to know is how to sellshort and I think it's buy to cover 30 points below...

Grrrrr difficult :P

Cheers.

Reply With Quote
  #9 (permalink)  
Old 03-26-2008, 06:39 PM
Blu-Ray's Avatar
Blu-Ray Blu-Ray is offline
Premium Trader

Trader Specs
 
Join Date: Nov 2006
Location: England
Posts: 355
Thanks: 60
Thanked 19 Times in 14 Posts
Re: Easylanguage and Script Help

Darknite

It would depend on your particular entry and stoploss criteria, Here's a strategy code I've done, but I've based it on entry 1 tick below the low of the reversal bar, with the stoploss being x amount of ticks above the high of the reversal bar ( I've made that section as an input, so you can decide ).

Inputs:
ProfTarget(30),StopLoss(1 ); { These inputs are in number of ticks }

Vars:
ShortEntry(0), Permission(0), Mintick(0), mystop(0), MP(0);

MP = marketposition;
Mintick = minmove/pricescale;


Condition1 = C[1]>C[2] and H > H [1] and H > H[2] and C < O;


if condition1 and MP = 0 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;


If you have exact entry and exit criteria different from above, just let me know and I'll amend it for you.

Hope this helps

Blu-Ray

__________________
Remember - Take the path of least resistance.
Reply With Quote
The Following User Says Thank You to Blu-Ray For This Useful Post:
thrunner (03-27-2008)
  #10 (permalink)  
Old 03-26-2008, 07:10 PM
darknite999 darknite999 is offline
Registered Trader

 
Join Date: Mar 2008
Posts: 25
Thanks: 8
Thanked 0 Times in 0 Posts
Re: Easylanguage and Script Help

Quote:
View Post
If you have exact entry and exit criteria different from above, just let me know and I'll amend it for you.

Hope this helps

Blu-Ray

Hey,

Thanks very much for your help.

I would like to place a stop loss 2 ticks above the high and sellshort 1 tick below the low

i want to buy to cover 30 below where I came in.

Cheers and once again thank you,
Darknite.

Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT -4. The time now is 08:05 AM.

 


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60