[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Logig help needed



PureBytes Links

Trading Reference Links

Hi Terry ,

thanks for help.This is my last problem im my Autorder Modul.(I hope so)

After 4 month (around the clock).... I will open the parameter
menue.....Push the start bottom....

By,Dieter




--- In amibroker@xxxxxxxxxxxxxxx, "Terry" <MagicTH@xxxx> wrote:
> Dieter,
> 
> - ParamTrigger does gives a numeric (True or False).
> 
> - Strings cannot be arrays...no such thing as String array unless you
> build your own using Var or StaticVar. You can do this:
> Act = WriteIf(array,"string if true","string if false"); which sort of
> appears as an array of strings and should do what you want.
> 
> - Loop is in HELP, it's just hard to find. Search for loop, pick the 2nd
> choice, AFL Reference Manual, scroll most of the way down until you see
> loop highlighted under for Statement.
> 
> - Mixing arrays and loops is confusing at best. You can use if(numeric)
> as the test and then use arrays inside the {}, but you cannot use an
> Array inside the if().
> --
> Terry
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
> Behalf Of dieterdotbraun
> Sent: Monday, October 03, 2005 13:02
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: Logig help needed
> 
> Hi Terry,
> thanks for help.
> If its possible that the Paramtrigger give a Nummber?
> This could be the reason why i get no error on the first two lines.
> If i use If function i can work an array directly but
> i can not fill a variabele with a string.(act="Buy")
> I alredy have try this.
> 
> Its any way to mix rules for Arry and Number?.
> 
>           Nummber    Array 
> > 
> > else if(AT1==1 AND A_Buy==1){Act="BUY" ;ORder_send=1;}
> 
> Is my understanding for this Correct?.
> 
> May be i have not understand very well the Loop function.
> I also always worry about some functions are not discribe in reference
> Libary. (function() /return)
> If any spezial Lokation i can find Infos are not documented in
> refference Libary?.
> 
> Thanks a lot for help.
> 
> regards ,Dieter
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Terry" <MagicTH@xxxx> wrote:
> > The error is due to using an ARRAY variable inside an if() statement.
> > These only operate on numeric or string variables (NON-Array). Why you
> > don't get an error until the 3rd statement doesn't make sense EXCEPT
> > that I have noticed the compiler does not always mark the correct
> line,
> > especially when subscripts [] are used (or should be used).
> > 
> > You must either put your code in a loop and access each bar with array
> > subscript or change your code to IIf(), which will be a little more
> > complex since you have 2 items to set for each test.
> 
> 
> 
> > --
> > Terry
> > -----Original Message-----
> > From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
> > Behalf Of dieterdotbraun
> > Sent: Monday, October 03, 2005 10:21
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Logig help needed
> > 
> > Hi poeple,
> > 
> > please give a little logig help.
> > 
> > always i get a Massage :
> > 
> > Error 6
> > Condition if,while,for statments
> > use [] Array subscrit Operator
> > 
> > The At1 Signal is from Parametertoogle
> > If i Put this code in a empty Formular its work well.
> > Do iput in my complete Formular with rest code its will not work.
> > The Lines Market with <<<<<<ok works any times well.
> > 
> > Waths wrong?I dont understand why the same syntax somtimes partial
> > works.
> > 
> > If i change A_Buy with buy its the same problem.
> > 
> > 
> > if(AT1==0 AND M_Buy ==1){Act="BUY" ;ORder_send=1;} <<<<< OK
> > else if(AT1==0 AND M_sell==1){Act="SELL";ORder_send=1;} <<<<< OK
> > 
> > else if(AT1==1 AND A_Buy==1){Act="BUY" ;ORder_send=1;} <<<<< ???
> > else if(AT1==1 AND A_Sell==1){Act="SELL";ORder_send=1;} <<<<< ???
> > else if(AT1==1 AND A_Cover==1){Act="BUY" ;ORder_send=1;} <<<<< ???
> > else if(AT1==1 AND A_Short==1){Act="SELL";ORder_send=1;} <<<<< ???
> > 
> > Thanks for hel in advance.
> > Dieter
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > Please note that this group is for discussion between users only.
> > 
> > To get support from AmiBroker please send an e-mail directly to 
> > SUPPORT {at} amibroker.com
> > 
> > For other support material please check also:
> > http://www.amibroker.com/support.html
> > 
> >  
> > Yahoo! Groups Links
> 
> 
> 
> 
> 
> Please note that this group is for discussion between users only.
> 
> To get support from AmiBroker please send an e-mail directly to 
> SUPPORT {at} amibroker.com
> 
> For other support material please check also:
> http://www.amibroker.com/support.html
> 
>  
> Yahoo! Groups Links




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/