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

Re: [amibroker] Fw: [AmiBroker-at] trying to generate a unique order id that gets sent out with each alertif output.


  • To: Padhu <amibroker@xxxxxxxxxxxxxxx>
  • Subject: Re: [amibroker] Fw: [AmiBroker-at] trying to generate a unique order id that gets sent out with each alertif output.
  • From: Herman <psytek@xxxxxxxx>
  • Date: Sat, 8 Sep 2007 07:16:06 -0400

PureBytes Links

Trading Reference Links

Perhaps you can use a DateTime stamp ( Now() )?


Be cautious not to confuse your custom timestamp to the one returned by the IBc. You cannot assign or customize the IBc OrderID.


best regards,

herman




Saturday, September 8, 2007, 6:53:12 AM, you wrote:


>

Trying to see if anyone on this group can share some ideas to do this.

----- Original Message ----- 

From: Padhu 

To: AmiBroker-at@yahoogroups.com 

Sent: Friday, September 07, 2007 10:52 PM

Subject: [AmiBroker-at] trying to generate a unique order id that gets sent out with each alertif output.


Hello,

 

I am trying to generate a unique order id that gets sent out with each alertif output.

 

I coded this way...Problem is it reinitizles to ZERO for every candle.

>

> buystrategy1=Close > Open;

>

> sellstrategy2= Close < Open;

>

> OrderID=0;

>

> {

>

> if( LastValue(buystrategy1) )

>

> OrderID=OrderID+1;

>

> StaticVarSet("OrderID",OrderID);

>

> }

>

> { if( LastValue(sellstrategy2) )

>

> OrderID=OrderID+1;

>

> StaticVarSet("OrderID",OrderID);

>

> }

>

> Currentorderid=StaticVarGet("OrderID");

>

> "Currentorder_Id is = "+Currentorderid;

 

Any ideas welcome. Thanks.

 

Cheers,Padhu

 

__._,_.___

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___