NexusFi: Find Your Edge


Home Menu

 





Ninja Limit - GetCurrentAsk or Bid


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one WolfieWolf with 2 posts (0 thanks)
    2. looks_two Big Mike with 1 posts (1 thanks)
    3. looks_3 tulanch with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 3,339 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 
WolfieWolf's Avatar
 WolfieWolf 
Charlottetown, Prince Edward Island
 
Experience: Advanced
Platform: Ninja
Broker: Optimus - Rithmic
Trading: GC
Posts: 232 since Jul 2010
Thanks Given: 100
Thanks Received: 272

Hi,

I have no doubt that this has been answered somewhere on here before but I haven't been able to find it. I'm also certain there is a simple solution but it's escaping me. If someone could offer some advice I would really appreciate it.

I'm developing a strategy and I want to play around with using Limit orders. When my order entry condition is violated I want to get the current ask ( GetCurrentAsk() ) and add five or so ticks to the limit sell order.

So, for example, trading crude the current ask is 92.99. I want to take 92.99 and + 0.05 and use that value 93.04 as the Limit Sell order. I am assuming that if I try to use GetCurrentask()+0.05 the Ask will continue to move and so will my order. How do I get the current Ask, store it as a constant, add five ticks to it and use that for my order?

I hope that was clear. Thanks

Wolfie


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
May 26 Deadline Dies at 7.5% as US Strikes Iran During C …
Prediction Markets & Event Contracts
Irans Dual Probability: Guns Quiet at 99.95% While Forma …
Prediction Markets & Event Contracts
Victory Day Delivers: Russia-Ukraine Ceasefire Market Cl …
Prediction Markets & Event Contracts
$12M Ceasefire Contract Goes Disputed as Bandar Abbas St …
Prediction Markets & Event Contracts
Ninjatrader users - good CONNECTIONs post and article fr …
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
15 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #3 (permalink)
 tulanch 
Salt Lake City, UT
 
Experience: Intermediate
Platform: SC, NT, MT
Broker: AMP
Trading: NQ ES YM Bonds
Posts: 285 since Mar 2010
Thanks Given: 51
Thanks Received: 405


Are you trying to write a strategy or are you just wanting to trade using that approach?

If you are just looking to trade that way, have you reviewed Nina's ATMs?


Reply With Quote
  #4 (permalink)
 
gulabv's Avatar
 gulabv 
Dallas, TX
 
Experience: Beginner
Platform: Ninjatrader
Broker: Zen-Fire
Trading: ZN, 6E
Posts: 286 since May 2010
Thanks Given: 161
Thanks Received: 169

I'm going from memory here but I believe the following would work:
GetCurrentask() + (TickSize * 5)


Reply With Quote
  #5 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,577

double entryprice = GetCurrentAsk() + (5 * TickSize)

EnterLongLimit(entryprice);

Mike




We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on X Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #6 (permalink)
 
WolfieWolf's Avatar
 WolfieWolf 
Charlottetown, Prince Edward Island
 
Experience: Advanced
Platform: Ninja
Broker: Optimus - Rithmic
Trading: GC
Posts: 232 since Jul 2010
Thanks Given: 100
Thanks Received: 272

Thanks guys! I used Big Mike's example and that worked perfectly. In my particular strategy using limit orders makes a massive difference. It improved the back-test results by about 20%. I'll live sim that next week, hopefully it performs as well during real market conditions.

Thanks again guys. I really appreciate your help.

Happy Trading!

Wolfie (The Werewolf) Wolf


Started this thread Reply With Quote




Last Updated on May 10, 2013


© 2026 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 - Downloads - Top
no new posts