NexusFi: Find Your Edge


Home Menu

 





Strategy Idea


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one max-td with 12 posts (3 thanks)
    2. looks_two soumi71 with 10 posts (1 thanks)
    3. looks_3 MXASJ with 8 posts (8 thanks)
    4. looks_4 gregid with 1 posts (2 thanks)
      Best Posters
    1. looks_one gregid with 2 thanks per post
    2. looks_two MXASJ with 1 thanks per post
    3. looks_3 max-td with 0.3 thanks per post
    4. looks_4 soumi71 with 0.1 thanks per post
    1. trending_up 12,315 views
    2. thumb_up 14 thanks given
    3. group 2 followers
    1. forum 30 posts
    2. attach_file 13 attachments




 
Search this Thread

Strategy Idea

  #11 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800

And here is the code you get when you hit "View Code"... edited for brevity and forum rules;

 
Code
                            
#region Using declarations
.Strategy;
#endregion
// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
/// <summary>
/// Enter the description of your strategy here
/// </summary>
[Description("Enter the description of your strategy here")]
public class 
ADXVMAFromScratch Strategy
{
#region Variables
// Wizard generated variables
private int aDXVMAPeriod 6// Default setting for ADXVMAPeriod
private int aDXPeriod 5// Default setting for ADXPeriod
private double aDXLevel 30// Default setting for ADXLevel
private int stop 8// Default setting for Stop
private int target 4// Default setting for Target
// User defined variables (add any user defined variables below)
#endregion
/// <summary>
/// This method is used to configure the strategy and is called once before any strategy method is called.
/// </summary>
protected override void Initialize()
{
Add(ADXVMA(ADXVMAPeriod));
Add(ADX(ADXPeriod));
SetStopLoss(""CalculationMode.TicksStopfalse);
SetProfitTarget(""CalculationMode.PercentTarget);
CalculateOnBarClose true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Condition set 1
if (ADXVMA(ADXVMAPeriod).ADXVMAPlot[0] > ADXVMA(ADXVMAPeriod).ADXVMAPlot[1]
&& 
ADXVMA(ADXVMAPeriod).ADXVMAPlot[1] > ADXVMA(ADXVMAPeriod).ADXVMAPlot[2]
&& 
ADX(ADXPeriod)[0] > 30
&& Rising(ADX(ADXPeriod)) == true
&& Rising(Close) == true)
{
EnterLong(DefaultQuantity"Long");
}
}
#region Properties
[Description("ADXVMA Period")]
[
GridCategory("Parameters")]
public 
int ADXVMAPeriod
{
get { return aDXVMAPeriod; }
set aDXVMAPeriod Math.Max(1value); }
}
[
Description("ADX Period")]
[
GridCategory("Parameters")]
public 
int ADXPeriod
{
get { return aDXPeriod; }
set aDXPeriod Math.Max(1value); }
}
[
Description("ADX Level or Threshold")]
[
GridCategory("Parameters")]
public 
double ADXLevel
{
get { return aDXLevel; }
set aDXLevel Math.Max(1value); }
}
[
Description("Initial Stop")]
[
GridCategory("Parameters")]
public 
int Stop
{
get { return stop; }
set stop Math.Max(1value); }
}
[
Description("Initial Target")]
[
GridCategory("Parameters")]
public 
int Target
{
get { return target; }
set target Math.Max(1value); }
}
#endregion
}
}
#region Wizard settings, neither change nor remove
#endregion 

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
What broker to use for trading palladium futures
Commodities
About a successful futures trader who didn´t know anyth …
Psychology and Money Management
How to apply profiles
Traders Hideout
MC PL editor upgrade
MultiCharts
Cheap historycal L1 data for stocks
Stocks and ETFs
 
  #12 (permalink)
 soumi71 
Toronto
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Zen-Fire
Trading: CL , 6E
Posts: 199 since Jun 2009
Thanks Given: 760
Thanks Received: 275

Thank you very much guys for taking the time and energy towards this project , keep in mind that the strategy will be posted in the strategy download section for everyone to profit from , I noticed that it works really well in 6E and nails $200 easily every morning :
the setup is easy :
ADX VMA trade zones : will show zones where the market is trending and zones where the market is consolidating that's the beauty of this indicator , it has several other embeded features like the diamond , but frankly I don't know how to read them , I use it most to visually spot long and shorts ,
EMA : set to 30
price closes above EMA and ADX rising and ( DMI - DMI + start to seprate , I go long )
price close below EMA and ADX rising and ( DMI - DMI + start to seprate , I go short )
 
my Big issue it to find a way to get out of consolidation areas ,
I am not a technical person as you can see , but the logic behind this strategy is that it works on tick charts , spots mini trends even when market is ranging on minutes charts and gives you 2 good signals every morning , enough to make a living

I have attached another screenshot from 6E ,
Thanks again

Sonia

Attached Thumbnails
Click image for larger version

Name:	6E-275ticks.JPG
Views:	252
Size:	149.2 KB
ID:	4999  
Started this thread Reply With Quote
Thanked by:
  #13 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800


Sorry I got ahead of myself there . One can add price, EMA, and ADX easily, or delete the code above (never delete, start a new file or save as!)... but its past my bedtime now.

The "every morning" statement is also worth noting. One can code times to trade.

On "consolidation"... that might be holy grail stuff. One timeframes consolidation might be another timeframes trend.

Reply With Quote
  #14 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927

ok - nice infos !

that tells me --

- ADX above below 30 is not in your condition

- ADXVMA zone can be reduced to standard ADXVMA

- we start to look for signal if the ADXVMA is yello

is this right like this ?

max-td
Reply With Quote
  #15 (permalink)
 soumi71 
Toronto
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Zen-Fire
Trading: CL , 6E
Posts: 199 since Jun 2009
Thanks Given: 760
Thanks Received: 275

yes Max that's exactly it

Started this thread Reply With Quote
  #16 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927

and what gives you the direction of the entry (long or short ) ?

maybee you can draw some more exact ENTRY-point in the 6 E picture

max-td
Reply With Quote
  #17 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927

is this horizontal line in the DMI important ?

max-td
Reply With Quote
  #18 (permalink)
 soumi71 
Toronto
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Zen-Fire
Trading: CL , 6E
Posts: 199 since Jun 2009
Thanks Given: 760
Thanks Received: 275

I have attached a screenshot of valid entry points , ( long side only ) the yellow line in the ADX VMA shows consolidation areas , this is where the trailing stop should come into play , because is market is only retracing to go higher we will still be there , if it's going lower the trailing would take us out of the market after locking some nice profits from the previous move , that's the idea
Thanks

Attached Thumbnails
Click image for larger version

Name:	6E 12-09  11_25_2009 (275 Tick)2.jpg
Views:	247
Size:	131.2 KB
ID:	5000   Click image for larger version

Name:	6E 12-09  11_25_2009 (275 Tick).jpg
Views:	202
Size:	119.8 KB
ID:	5001  
Started this thread Reply With Quote
  #19 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800

I've had too much holiday cheer but here you go;

If price above 30 period EMA
AND 30 period EMA above n period ADXVMA
AND ADXVMA rising
AND 30 period EMA rising
AND price rising

Go long?

Get out when;

Stop hit
OR xxx cross below xxx

Last post for tonight. Promise!

EDIT: Why dind't you go long at 10:03 in your chart. What is the ADX "rule'?

Reply With Quote
  #20 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927


well - first we have to stay with the ENTRIEs.

you have to write down an exact description of all conditions at the moment we do the entry.
then we have to look at wich other point these conditions are valid and if our description/ entry-definition is good enaugh or not.

what does EMA
what does DMI
what does ADX
what does Price

max-td
Reply With Quote




Last Updated on December 2, 2009


© 2024 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 - Privacy Policy - Downloads - Top
no new posts