NexusFi: Find Your Edge


Home Menu

 





Simple strategy


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one vast with 9 posts (0 thanks)
    2. looks_two Big Mike with 6 posts (1 thanks)
    3. looks_3 max-td with 2 posts (0 thanks)
    4. looks_4 Trader.Jon with 1 posts (0 thanks)
    1. trending_up 6,943 views
    2. thumb_up 3 thanks given
    3. group 5 followers
    1. forum 19 posts
    2. attach_file 1 attachments




 
Search this Thread

Simple strategy

  #1 (permalink)
 
vast's Avatar
 vast 
Australia
 
Experience: Intermediate
Platform: Ninja
Posts: 167 since Jun 2009
Thanks Given: 154
Thanks Received: 62

I am needing some help with getting an order to enter once a doublema changes from falling to rising.
I have tried several things, but can't get it to work at the correct spots.
I just need help with the entry trigger. When DoubleMA changes from falling to rising (it changes colour anyway) I would like to enter a long.
I would like to only take one trade per change from falling to rising as well.

As it is not crossing over anything, I am confused.
Thanks in advance
Regards

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
How to apply profiles
Traders Hideout
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
  #2 (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 - lets see ....

first of all - i dont like these big indicator-codes like the DMA-stuff in strategys - thats why the first step would be to create a new small indicator or reducing it to an easy formular (without all color+parameter-things) wich hits what i needs -- example :

ZeroLagEMA(ZeroLagEMA(period), period)

than as condition a would try this :

if
ZeroLagEMA(ZeroLagEMA(period), period) [0] > ZeroLagEMA(ZeroLagEMA(period), period) [1]

... do something

if
ZeroLagEMA(ZeroLagEMA(16), 16) [0] > ZeroLagEMA(ZeroLagEMA(16), 16) [1]

... ENTER long ...

If this easy thing does what you want, you can go on + add more conditions
thats my why of building up + testing conditions.

max-td
Reply With Quote
  #3 (permalink)
 
vast's Avatar
 vast 
Australia
 
Experience: Intermediate
Platform: Ninja
Posts: 167 since Jun 2009
Thanks Given: 154
Thanks Received: 62


OK. Thanks. Will give it a go

Started this thread Reply With Quote
  #4 (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

also - depending on the instrument - i sometimes use to make a rounding of the indicator-values i compare to eachother in my conditions.

max-td
Reply With Quote
  #5 (permalink)
 
vast's Avatar
 vast 
Australia
 
Experience: Intermediate
Platform: Ninja
Posts: 167 since Jun 2009
Thanks Given: 154
Thanks Received: 62

Mike,
I am wondering how I can use this information in a strategy please.
I am a real novice when it comes to C#.
"I released a newer version of DoubleMA with more moving averages and a Signal dataseries (0 neutral, -1 short, 1 long).
Could you please provide an example?
ie: if
(DoubleMA(45,NinjaTrader.Indicator.DoubleMA_internal.DMAType.EMA,45,NinjaTrader.Indicator.DoubleMA_internal.DMAType.EMA).signal[1]

Enter long?

Started this thread Reply With Quote
  #6 (permalink)
 
Big Mike's Avatar
 Big Mike 
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,463 since Jun 2009
Thanks Given: 33,236
Thanks Received: 101,661


vast View Post
Mike,
I am wondering how I can use this information in a strategy please.
I am a real novice when it comes to C#.
"I released a newer version of DoubleMA with more moving averages and a Signal dataseries (0 neutral, -1 short, 1 long).
Could you please provide an example?
ie: if
(DoubleMA(45,NinjaTrader.Indicator.DoubleMA_internal.DMAType.EMA,45,NinjaTrader.Indicator.DoubleMA_internal.DMAType.EMA).signal[1]

Enter long?

This looks right, I am not sure I understand what is not working for you.

Signal dataseries:
1 == rising
0 == neutral
-1 == falling

Keep in mind if you use the wizard it places + sign instead of . in a couple of places, you need to manually change it, but your string above seems fine.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #7 (permalink)
 
vast's Avatar
 vast 
Australia
 
Experience: Intermediate
Platform: Ninja
Posts: 167 since Jun 2009
Thanks Given: 154
Thanks Received: 62

Thanks Mike.
I tried it and it ame me an error of:Cannot implicitly convert type 'double' to 'bool'
So I tried this:
if (DoubleMA(30,NinjaTrader.Indicator.DoubleMA_internal.DMAType.ZeroLagEMA,30,NinjaTrader.Indicator.DoubleMA_internal.DMAType.ZeroLagEMA).Signal[1] > DoubleMA(30,NinjaTrader.Indicator.DoubleMA_internal.DMAType.ZeroLagEMA,30,NinjaTrader.Indicator.DoubleMA_internal.DMAType.ZeroLagEMA).Signal[-1])
{
EnterLongLimit(DefaultQuantity, GetCurrentAsk(), "Long");
}
It compiled but doesn't work.
All I am trying to do it enter a long after the DMA goes from falling to rising. I must be dumb.
Sorry

Started this thread Reply With Quote
  #8 (permalink)
 
Big Mike's Avatar
 Big Mike 
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,463 since Jun 2009
Thanks Given: 33,236
Thanks Received: 101,661

Ok, here is the issue

Signal[x] where x=number of bars ago. 0 means current bar that just closed, 10 means 10 bars ago, 100 means 100 bars ago. That is basic NT.

What you need to do is change the end of your string to:

Signal[0] == -1) (this represents a short, for a long change to Signal[0] == 1)

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #9 (permalink)
 
vast's Avatar
 vast 
Australia
 
Experience: Intermediate
Platform: Ninja
Posts: 167 since Jun 2009
Thanks Given: 154
Thanks Received: 62

Thank you. Sorry for hassle. At least I am giving it a go.
I have a lot to learn.

Started this thread Reply With Quote
  #10 (permalink)
 
Big Mike's Avatar
 Big Mike 
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,463 since Jun 2009
Thanks Given: 33,236
Thanks Received: 101,661



vast View Post
Thank you. Sorry for hassle. At least I am giving it a go.
I have a lot to learn.

No hassle at all. I had some "duh" moments when I learned it as well.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote




Last Updated on August 5, 2010


© 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