Dark Theme
Light Theme
Trading Articles
Article Categories
Article Tools
Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to
register in order to view the content of the threads and start contributing to our community.
It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
ORDER PENDING
Updated November 30, 2010
Top Posters
looks_one
firecan
with 3 posts (0 thanks)
looks_two
max-td
with 2 posts (0 thanks)
looks_3
Xeno
with 2 posts (0 thanks)
looks_4
Big Mike
with 1 posts (0 thanks)
trending_up
3,124 views
thumb_up
0 thanks given
group
3 followers
forum
8 posts
attach_file
0 attachments
ORDER PENDING
November 28th, 2010, 05:04 PM
sevilla
Experience: Intermediate
Platform: Ninja Trader
Trading: futures
Posts: 28 since Nov 2010
Thanks Given: 9
Thanks Received: 3
Hi, I want to send a pending order when the market reaches a certain price. (NT)
Is this possible ?
CODE :
if (Price = touch_price)
{EnterLong (0,true,contrats,Close[0]+DistanceMarket*TickSize, "Open Long 1");}
Regards.
Can you help answer these questions from other members on NexusFi?
Best Threads (Most Thanked) in the last 7 days on NexusFi
November 29th, 2010, 08:39 AM
UK
Experience: Intermediate
Platform: Ninja
Broker: Mirus/Zen
Trading: Futures - bonds, currencies, index
Posts: 288 since Oct 2010
Thanks Given: 70
Thanks Received: 274
If you want to go long, use one of these
EnterLongStop
EnterLongLimit
Stop for entries above the current price, and limit for entries below. Replace Long with Short to go short.
November 29th, 2010, 09:18 AM
sevilla
Experience: Intermediate
Platform: Ninja Trader
Trading: futures
Posts: 28 since Nov 2010
Thanks Given: 9
Thanks Received: 3
Hello again, thank you.
The problem is to write the code that generates the entry.
Can you help me.
_________________________________________________________
Variables
private int touch_price = 1,2345
if (Price = touch_price) // This is wrong code - need change it -
{EnterLongStop (0,true,contrats,Close[0]+DistanceMarket*TickSize, "Open Long 1");}
__________________________________________________________
Regards.
Salvador.
November 29th, 2010, 09:48 AM
UK
Experience: Intermediate
Platform: Ninja
Broker: Mirus/Zen
Trading: Futures - bonds, currencies, index
Posts: 288 since Oct 2010
Thanks Given: 70
Thanks Received: 274
I'm not sure exactly what you're having trouble with. Your if statement needs == rather than =
Was that all?
November 29th, 2010, 07:28 PM
sevilla
Experience: Intermediate
Platform: Ninja Trader
Trading: futures
Posts: 28 since Nov 2010
Thanks Given: 9
Thanks Received: 3
Hello again.
I've tried with:
private int touch_price = 1,4030 ; // 6E
private boll touch_price = 1,4030 ; // 6E
private double touch_price = 1,4030 ; // 6E
And in any case accept decimals.
Also:
if (Position.AvgPrice == touch_price);
GoLong();
I don't know if it works with (Position.AvgPrice == touch_price); .Becasue do not let me compile it by not allowing decimals.
Could you help me.
Greetings.
November 29th, 2010, 11:39 PM
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,465 since Jun 2009
Thanks Given: 33,242
Thanks Received: 101,665
firecan
Hello again.
I've tried with:
private int touch_price = 1,4030 ; // 6E
private boll touch_price = 1,4030 ; // 6E
private double touch_price = 1,4030 ; // 6E
And in any case accept decimals.
Also:
if (Position.AvgPrice == touch_price);
GoLong();
I don't know if it works with (Position.AvgPrice == touch_price); .Becasue do not let me compile it by not allowing decimals.
Could you help me.
Greetings.
You need to wrap code snippets in the [code]put code here[/code] tags to prevent bad formatting on the forum.
It sounds like what you are wanting is called Market On Touch. You'll have to run your strategy with COBC = false to monitor tick by tick.
You seem to be saying you are getting an error message. It would be helpful if you would post a screen shot of the error message, but my guess from your posts is that you need to use a dot . not a comma , in the double. BTW, an int cannot have decimals, and a boolean cannot have decimals.
I suggest you study some existing strategy and indicator code, there are hundreds available on this site. Read line by line and you will begin to understand what you can do from others working examples.
Mike
November 30th, 2010, 02:52 AM
Frankfurt
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927
firecan
Hello again.
I've tried with:
private int touch_price = 1,4030 ; // 6E
private boll touch_price = 1,4030 ; // 6E
private double touch_price = 1,4030 ; // 6E
And in any case accept decimals.
Also:
if (Position.AvgPrice == touch_price);
GoLong();
I don't know if it works with (Position.AvgPrice == touch_price); .Becasue do not let me compile it by not allowing decimals.
Could you help me.
Greetings.
maybe this helps for one step ahead ....
your last sentence explains one problem to me
decimals in codes dont like comma but they need to be written with points
try it like this :
Code
private int touch_price = 1.4030 ; // 6E private bool touch_price = 1.4030 ; // 6E private double touch_price = 1.4030 ; // 6E
and report
-
November 30th, 2010, 03:02 AM
Frankfurt
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927
ooops,
mike wrote something like this yet
Quoting
by mike : You seem to be saying you are getting an error message. It would be helpful if you would post a
screen shot of the error message, but my guess from your posts is that you need to use a dot . not a comma , in the double. BTW, an int cannot have decimals, and a boolean cannot have decimals.
i am still sleepy a bit here it seems
Last Updated on November 30, 2010