buy this bar on close;
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
why didn't this code work
Collapse
X
-
Tags: None
-
thank you for your reply Josh, however I'm confused as to how I would enter an order then
if this is correct:
if NTMarketPosition("Uxxxxx") = 0 then begin
//buy this bar on close;
then would this work...
if NTMarketPosition("Uxxxxx") = 0 then
begin
if condition1 then
buy this bar on close;
end
2) Also, using the following functions that are in the NT DLL, will you get tradestation to successfully backtest it. Say that the following code
if condition1 then
buy this bar on close
if barssinceentry = 5 then
sell this bar on close
* say that the above code produces 50 trades on a tradestation backtest
now
if NTMarketPosition("Uxxxxx") = 0 then
begin
if condition1 then
buy this bar on close;
end
if NTMarketPosition("Uxxxxx") > 0 then
begin
if barssinceentry = 5 then
sell this bar on close;
end
?? would you get the 50 trades to show up on the tradestation backtest?
Comment
-
1)Code:buy this bar on close
Code:if NTMarketPosition("Uxxxxx") = 0 then begin if condition1 then buy this bar on close; end
2) Unfortunately I cannot provide guidance on TradeStation's backtesting, but I would assume the codes will work theoretically. Perhaps this sample code (http://www.ninjatrader-support.com/H...SanpleStrategy) will help you in programming ELDs that use NinjaTrader in TradeStation.Josh P.NinjaTrader Customer Service
Comment
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by bortz, 11-06-2023, 08:04 AM
|
47 responses
1,605 views
0 likes
|
Last Post
by aligator
Today, 07:22 PM
|
||
Started by jaybedreamin, Today, 05:56 PM
|
0 responses
8 views
0 likes
|
Last Post
by jaybedreamin
Today, 05:56 PM
|
||
Started by DJ888, 04-16-2024, 06:09 PM
|
6 responses
18 views
0 likes
|
Last Post
by DJ888
Today, 05:12 PM
|
||
Started by Jon17, Today, 04:33 PM
|
0 responses
4 views
0 likes
|
Last Post
by Jon17
Today, 04:33 PM
|
||
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
13 views
0 likes
|
Last Post
by Javierw.ok
Today, 04:12 PM
|
Comment