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 sam028 with 1 posts (1 thanks)
    1. trending_up 6,821 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?
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Deepmoney LLM
Elite Quantitative GenAI/LLM
Better Renko Gaps
The Elite Circle
ZombieSqueeze
Platforms and Indicators
NexusFi Journal Challenge - April 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
GFIs1 1 DAX trade per day journal
18 thanks
The Program
18 thanks
  #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,396 since Jun 2009
Thanks Given: 33,172
Thanks Received: 101,536


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,396 since Jun 2009
Thanks Given: 33,172
Thanks Received: 101,536

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,396 since Jun 2009
Thanks Given: 33,172
Thanks Received: 101,536



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