I have an first short order at 10000 and then if it reaches 10015 and there is a trigger for the second short order but the first short order has not been filled. Can I take the second short order? If it is possible then give me some tips or reference sample on how to do the second short order. What method will be I am going to used?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
ATM in ninja script strategy
Collapse
X
-
Hello Bertran will you please help me in this situation:
I have an first short order at 10000 and then if it reaches 10015 and there is a trigger for the second short order but the first short order has not been filled. Can I take the second short order? If it is possible then give me some tips or reference sample on how to do the second short order. What method will be I am going to used?
-
Is this equal? For example my ATM strategy template in the SuperDom is CL Scalp then I declared it as private string template="CL_Scalp". I put an underscore as a replacement for the space in CL Scalp. Is it equal or I will have it to private string template= "CL Scalp"?
Comment
-
Bertran will you please help me on this. I have a time filter and I tried my strategy that will call ATM strategy and then my problem is that my entry condtion is hit at 9:45 and it is greather than my startTime which is 9:30 suppose to be it will entry an order but It will not entry. I tried it in a market replay. I tried it with a tick type and CalculateOnBarClose is set to false.Last edited by luxurious_04; 09-14-2010, 02:09 AM.
Comment
-
I will do that now thanks for that idea. One more thing is that it will entry an order at 10 am until 4 pm. I just wandering if why does it will entry an order at the first bar of the market replay.
Comment
-
I didn't used MinBarsRequired setting. The YM chart i used is 10 mins. It will now trade at the 9:30 when the entry condition is hit. I used the ToTime(Time[0]) but in the next day it will not trade again at my starting time when my condition is hit and it will trade at 1:30 pm in that day but it is opposite to my entry condition and more thing, my order.action is buy and it will buy but if the order gets cancelled it entry an order that is sell. I am so confused. Please help me.Originally posted by NinjaTrader_Bertrand View PostWhat MinBarsRequired setting are you using as you start up the strategy in Market Replay?
Comment
-
luxurious_04, you should simplify your strategy and work for a start one side of the market only and ensure this works to your expectations before proceeding to get more complex - a good approach would also be printing out the associated values and order / strategy Id's to you can check they are set / reset as needed to take the next trade then.
The MinBarsRequired is set as you start up the strategy, it determines how many bars are skipped at the OnBarUpdate() start to give for example indicators needed time to catch up with their values to produce reasonable values for your data.
Comment
-
I use the default MinBarsRequired which is 20. Why does it will not reset properly I just follow the sample in ninja.
Comment
-
Bertran thank you. Please give hint on this problem: If RSI is below or equal to 20 then I will look for the lowest low of the next value of RSI on the next bar.
current bar:
if RSI <=20
next 2/3 bars:
RSI is below or equal to 20 again then I will get which of that bars has the lowest low of RSI then my entry price will base on the low price of that bar.
Any idea would be appreciated. Thanks in advance.
Comment
-
Ah okay I will need to track the lowest price of the bar. How about this I will also need to track the lowest value of the RSI, for example:
RSI.Avg[0] <=20
if in the next two bars RSI is still below or equal to 20 then I will select which of RSI has the lowest value.
Comment
-
if (RSI(RSIperiod, RSIsmooth).Avg[0] <= 20)
{
double RsiLowValue= RSI(RSIperiod, RSIsmooth).Avg[0];
}
Then now how I am going to differentiate the RsiLowValue to the value of RSI in the next two bars?
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
649 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
370 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
109 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
573 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
576 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment