Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Moving Average of a Indicator
Collapse
X
-
late trigger
I have a set of cirteria when meet, my strategies should get me In or Out
of the market But its triggering the signal 2 bars later
for example i ask to be out of a long when cci cross below Zero
it gets me out 2 Bars later...
Anyone know what i am doing wrong here....
Thanks,
Comment
-
here is the code
// Condition set 2
if (CrossBelow(CCI(14), 100, 1))
{
ExitLong("EXITLONG", "");
DrawArrowDown("My down arrow" + CurrentBar, false, 0, 0, Color.Red);
}
why is the above trigering 2 bars later?
I check and recheck i can not find anything wrong Or I do not know enough to find this problem,
Comment
-
In real-time, executions are plotted where they really occur which is different than in a backtest.
If your CCI cross happens on Bar #100 and you are 2 second charts and the order gets filled 4 seconds later....the execution would be plotted on Bar #102 as an example since it will have an execution time stamp 4 seconds from the time the order was placed.RayNinjaTrader Customer Service
Comment
-
I see what you are saying
I am using rang bars.. each candle bar is any where from 4 to 10 minuts
this is filling the order 2 bars later and its market order in a eletronic market,
market orders get filled in a matter of One or Two seconds,in this market
This is delaying a market order after its triggard about an average of 15 minutes give or take few...that is really a long time
Comment
-
I see what you are saying
I am using rang bars.. each candle bar is any where from 4 to 10 minutes
this is filling the order 1 or 2 bars later and its market order in a eletronic market,
market orders get filled in a matter of One or Two Seconds,in this market
This is delaying a market order after its triggard about an average of 15 Minutes give or take few...that is really a long time
Take look at the attachment where you see market 1,2,3 on cci crossing above its 3 day EMA look above to see where its filling the orders.
also see cci crossing below 100 marked x<100 it should close the trade on red bar with the large blue arrow above. its 40 ticks and 10 minutes later it has not closed the trade yet....
I need this to tirgger a maket order as soon as the crossing happens.
any input is appriciated...
KianLast edited by kian1; 02-15-2008, 09:43 AM.
Comment
-
I can't comment on when you code should trigger entries and exits since I don't know your code. What I can say is this -
- Orders are submitted at the close of a bar where you call an order method --> There is no 15 minute delay
- To double check this you can add Print() call and include the the time of a bar when you place an order, this will show up in the Output window. You can then check this time to the time in the Log tab of when a market order is placed.
- In addition, you can run the SampelMACrossOver strategy and see that orders are really placed when the crosses happen. If your experience is different with the sample strategy then let us know.RayNinjaTrader Customer Service
Comment
-
look at the blue arrow where MAs cross and look where it executed the trade.......
my strategy requires the trade to go market and it fill usually with in a second or less in the electronic markets
using a 10 and 25 cross over that is a longer term strategy and it probably cross each other once or twice a day deponding on the time frame under 60 minutes, so the exact execution probably is not as important.
if you come up with anything let me know or anyone else is going through the samething like to hear your ideas.
Thanks
Kian
Comment
-
That looks normal to me assuming calculate on bar close is true. The bar you have highlighted the values are either equal or haven't quite crossed yet, you can verify this in the data box. When the next bar closes, the cross condition is true. You get filled at the open of the following bar.
Comment
-
something is wrong
I have written a very simple strategy and tested it on daily bars. Now that open tick is working I tried test it on minute charts(1 and 5 minute charts) but as soon as an enter signal is generated, it exits immediately at the entry price. But it works fine on daily bars. What could be the problem?
I have tested with all other strategies as well but it wont work. Have I adjusted something wrong?No matter what strategy I use...even if I switch time frames...problem is same....Last edited by Fecdzo; 02-16-2008, 06:27 AM.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by cmtjoancolmenero, Yesterday, 03:58 PM
|
9 responses
35 views
0 likes
|
Last Post Today, 11:02 AM | ||
Started by DayTradingDEMON, Today, 09:28 AM
|
4 responses
23 views
0 likes
|
Last Post Today, 10:47 AM | ||
Started by geddyisodin, Yesterday, 05:20 AM
|
9 responses
50 views
0 likes
|
Last Post Today, 10:45 AM | ||
Started by George21, Today, 10:07 AM
|
1 response
15 views
0 likes
|
Last Post Today, 10:43 AM | ||
Started by Stanfillirenfro, Today, 07:23 AM
|
9 responses
24 views
0 likes
|
Last Post Today, 10:16 AM |
Comment