PureBytes Links
Trading Reference Links
|
Never mind... I figured out what was wrong in the formula,
Actually one of the IF conditions in the formula were using AND function.
If (condition1 AND Condition2 AND condition3) {
...
...
...
}
This was the problem, when the formula is running in the background of AA window, then for some reason it cannot process the IF condition, at least in my case.
I changed it to below code, then it worked. Weird part is the IF condition with AND works fine when the symbol is displayed on the chart window.
If (condition1) {
If (condition2) {
If (condition3) {
...
...
}
}
}
Thanks...
--- In amibroker@xxxxxxxxxxxxxxx, "markedme9" <markedme9@xxx> wrote:
>
>
> Hi,
>
> I am having a problem with ibc functions, if I use ibc.PlaceOrder within
> a couple of IF statements the order function dosent place orders from AA
> window. Though both IF conditions are True. In this use ibc.PlaceOrder
> is placing orders only if the symbol is displayed on the chart window,
> and not for any other symbols found in background of AA window.
>
> If I use the same ibc.PlaceOrder outside of the IF statements then,
> ibc.PlaceOrder works to place orders for any symbol's buy signal found
> in AA alanysis.
>
> Both IF conditions are true, then why is this happening? are there any
> limitations/specifications for using ibc function at specific places?
>
>
>
> if ( StaticVarGet("SystemInit") == True ) {
>
> if ( Positions < StaticVarGet ("MaxPositions") ) {
>
> BuyOrderID = ibc.PlaceOrder(StaticVarGetText ("BuyOrderName " + Symbol),
> "Buy", 100, "MKT", StaticVarGet ("BuyPrice " + Symbol), 0, "Day", True);
>
> }
>
> }
>
>
>
> Thanks...
>
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|