Time function doesn't take parameter

How to create strategies and indicators
Message
Author
kalniss
Posts: 1
Joined: Wed Aug 01, 2012 1:23 pm

Time function doesn't take parameter

#1 Postby kalniss » Wed Aug 01, 2012 1:40 pm

Hi,

I'm actually stuck on a very simple problem. I want to add a line to my chart:

ObjectCreate('Trend line 01', obj_TrendLine, 0, Time(10), Close(10), Time(0), Close(0));

but when I try to compile Delphi 7 tells me that there are too many parameters for Time()!!!

Please help!

Stonev
Posts: 204
Joined: Thu Jan 28, 2010 2:20 pm

#2 Postby Stonev » Wed Aug 01, 2012 10:58 pm

I think you use SysUtils in your project after IndicatorInterfaceUnit
if so swap IndicatorInterfaceUnit and SysUtils
like this:

Code: Select all

uses
  SysUtils,
  IndicatorInterfaceUnit,
  TechnicalFunctions;


or use Time(10) as IndicatorInterfaceUnit.Time(10)
Coding & Converting

Phil_Trade
Posts: 94
Joined: Tue Jan 31, 2012 5:14 am
Contact:

Re: Time function doesn't take parameter

#3 Postby Phil_Trade » Thu Aug 02, 2012 4:22 am

kalniss wrote:Hi,

I'm actually stuck on a very simple problem. I want to add a line to my chart:

ObjectCreate('Trend line 01', obj_TrendLine, 0, Time(10), Close(10), Time(0), Close(0));

but when I try to compile Delphi 7 tells me that there are too many parameters for Time()!!!

Please help!


Hello

I was also stuck with this. I wrote this module like this

Code: Select all

procedure TraceLigne(PaireDevise : string ; LineTM : integer;  Couleur : integer; Trait : tPenStyle; Texte :string);

begin
if AvecTraceLigne=0 then
begin
NumeroVLine := NumeroVLine+1;
SetCurrencyAndTimeframe(PaireDevise, LineTM);
ObjectCreate(IntToStr(NumeroVLine), obj_VLine, 0, iTime(PaireDevise,LineTM,0),Bid, iTime(PaireDevise,LineTM,0),Bid, iTime(PaireDevise,LineTM,0),Bid);
ObjectSet(IntToStr(NumeroVLine),OBJPROP_COLOR, Couleur);
ObjectSet(IntToStr(NumeroVLine), OBJPROP_STYLE, integer(Trait));
ObjectSetText(IntToStr(NumeroVLine), Texte);
end;
end;
my live account - 8 based pairs with optimized parameters : +188%
http://www.myfxbook.com/members/Philipp ... jpg/519044
TradeSlide : http://bit.ly/14R9Nf6

to be informed about Windev/MT4 services : a04486-tradingsignal@yahoo.fr


Return to “FT API”

Who is online

Users browsing this forum: No registered users and 14 guests