NexusFi: Find Your Edge


Home Menu

 





volume need to make average price current bid/offer - nt


Discussion in NinjaTrader

Updated
    1. trending_up 2,826 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 0 posts
    2. attach_file 0 attachments




 
Search this Thread

volume need to make average price current bid/offer - nt

  #1 (permalink)
 gparkis 
New York City, NY/USA
 
Experience: Intermediate
Platform: NT
Trading: 6E, ZN, CL
Posts: 121 since Dec 2010
Thanks Given: 3
Thanks Received: 74

trying to create an output in NT to deal with average price and volume. It is for hedging purposes.

Average price for a trade is:
price1*vol1 + price2*vol2/ vol1 + vol2 = average price

assume I am short the market at price 1 for vol 1, and the market is moving up against my position, I want the readout to essentially tell me....
at the current OFFER, I would need to trade a vol2 of X to make the average price then equal the current OFFER.

Example,
Price 1 1004.75 volume 1, assume short so following the offer
Offer currently now 1006.75, so I would want output to tell me that if I short a volume of 15 at this offer then my average price will equal the offer price...1006.75.
1004.75 *1 + 1006.75*15/1+15=1006.63
which the DOM will show as 1006.75 or the OFFER.

I am trying to break this down to give to a coder to create this real time volume output to make average price = current offer when short and average price = current bid when long.

any input would be great

Started this thread Reply With Quote




Last Updated on February 23, 2013


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts