Re: [amibroker] Simulate several Pending orders

 

You can add order sizes the same way, and now you have for each bar in trade the size and the price so you can compute the weighted average.

....
if( Buy [i] )
{

    order = Null ;

    for( n = 1 ; n <= orders  ; n ++ )
    {
        order [n] = Close [i] - n * increment;
    }

    ordersize = Null ;

    for( n = 1 ; n <= orders  ; n ++ )
    {
        ordersize [n] =  n * 5000;
    }

    pos  = True;
}





On 3/17/2016 12:47 AM, pmxgs0@gmail.com [amibroker] wrote:
Do you see a simple approach for this or maybe I'm missing something?

__._,_.___

Posted by: Aron Pipa <aron@myafl.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (0)

Check out the automatic photo album with 2 photo(s) from this topic.
ehgdcggj.png eeffiibe.png

Save time and get your email on the go with the Yahoo Mail App
Get the beautifully designed, lighting fast, and easy-to-use, Yahoo Mail app today. Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.

**** 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/


.

__,_._,___


EmoticonEmoticon