FX Trek Intellescript custom indicators

If you don't know where to start, start here! Don't be afraid to ask questions.

Moderator: moderators

User avatar
daniil
rank: 50+ posts
rank: 50+ posts
Posts: 61
Joined: Mon May 07, 2007 6:40 am
Reputation: 0
Gender: Male

Postby daniil » Thu May 31, 2007 3:11 am

sorry you must also add these 2 lines before >> //code begins

Global begin_time = 1600
Global straddle =3

Replace >> IF GetBarTime(0) = begin_time

with >> IF GetBarTime(0) = begin_time THEN

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

User avatar
daniil
rank: 50+ posts
rank: 50+ posts
Posts: 61
Joined: Mon May 07, 2007 6:40 am
Reputation: 0
Gender: Male

Postby daniil » Thu May 31, 2007 3:12 am

or with >> IF (GetBarTime(0) = begin_time) THEN

4x=0
rank: 150+ posts
rank: 150+ posts
Posts: 410
Joined: Tue Oct 17, 2006 10:53 pm
Reputation: 1
Gender: Male

Postby 4x=0 » Thu May 31, 2007 3:23 am


User avatar
daniil
rank: 50+ posts
rank: 50+ posts
Posts: 61
Joined: Mon May 07, 2007 6:40 am
Reputation: 0
Gender: Male

Postby daniil » Thu May 31, 2007 3:30 am

so simple code - so many errors :D
what about removing brackets?
i.e. IF GetBarTime(0) = begin_time THEN

i did not find any description of comparsion operators for this script language. C/CPP "=" is assignment but "==" is comparing

so maybe try >> IF GetBarTime(0) > begin_time THEN
Last edited by daniil on Thu May 31, 2007 3:40 am, edited 1 time in total.

4x=0
rank: 150+ posts
rank: 150+ posts
Posts: 410
Joined: Tue Oct 17, 2006 10:53 pm
Reputation: 1
Gender: Male

Postby 4x=0 » Thu May 31, 2007 3:55 am

syntax correct!

I can't believe it, it actually plots the lines too!

It seems to plot the line_open at the current price when I apply the indicator.

VERY NICE THO SO FAR


Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

User avatar
daniil
rank: 50+ posts
rank: 50+ posts
Posts: 61
Joined: Mon May 07, 2007 6:40 am
Reputation: 0
Gender: Male

Postby daniil » Thu May 31, 2007 4:10 am

what operator? ">"??

it must be "equal" or "equal or more", but not "more" in true words.

so it is easy now for you to add "zone" .0003-.0004 not single line.
the problem is that you have to manually remove these lines when you stop trading. i do not know how to do it automatically when time reaches OPEN_TIME + 1 hour. if it could be done it wold be the exactly what you want

4x=0
rank: 150+ posts
rank: 150+ posts
Posts: 410
Joined: Tue Oct 17, 2006 10:53 pm
Reputation: 1
Gender: Male

Postby 4x=0 » Thu May 31, 2007 4:16 am

Yes almost exactly what I want thanks to you.

Currently the line_open is plotting at the open of the current bar. Any ideas on how to plot the open of my 16:00 bar, for example?

User avatar
daniil
rank: 50+ posts
rank: 50+ posts
Posts: 61
Joined: Mon May 07, 2007 6:40 am
Reputation: 0
Gender: Male

Postby daniil » Thu May 31, 2007 4:28 am

so it redraws with each new bar?? strange... in this code i try to check if current bar time is equal or more than global variable begin_time which equals 1600 or "16:00"
by the way where do you set the global variables?

do you need me to draw the "zone" or it is enough?

i just found that GetBarTime works not like MT4 analog, it shows bar close time
so please try to use GetCurrTime() instead, and begin_time=160000 in that case

4x=0
rank: 150+ posts
rank: 150+ posts
Posts: 410
Joined: Tue Oct 17, 2006 10:53 pm
Reputation: 1
Gender: Male

Postby 4x=0 » Thu May 31, 2007 4:48 pm

It redraws the lines with each new bar. "<" stopped working this morning, and ">" started working until a few minutes ago and now "<" works again.

so it plots on the current bar when begin_time =1600

so i started at 2300 and went all the way down to 0000 and it worked for each one. I thought seeing begin_time to say 0200 and then using

IF GetBarTime(0) = begin_time THEN

and thought it might draw bars when 0200 came around, but this did not happen.

Any ideas anyone ?

User avatar
daniil
rank: 50+ posts
rank: 50+ posts
Posts: 61
Joined: Mon May 07, 2007 6:40 am
Reputation: 0
Gender: Male

Postby daniil » Fri Jun 01, 2007 1:24 am

i have some ideas but it is hard for me to compile the code in a way we choosed :D. GetBarTime returns the close time but not the open as i thought. so GetBarTime(0) returns current close time. i do not know when the previous (GetBarTime(1) ) bar closes, is it 16:00, or 15:59, or 15:59:59??? :S. Other question - we must draw lines only once but not each time.
it would be easy for me to check if i had this IntelliCharts.

pls PM me the TRO indicator.

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.


Return to “beginners forum”