NexusFi: Find Your Edge


Home Menu

 





Strategy Builder for Non-Programmers NO CODE


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one jmont1 with 47 posts (85 thanks)
    2. looks_two romus with 29 posts (20 thanks)
    3. looks_3 Fugitive69 with 16 posts (30 thanks)
    4. looks_4 userque with 15 posts (11 thanks)
      Best Posters
    1. looks_one Fugitive69 with 1.9 thanks per post
    2. looks_two jmont1 with 1.8 thanks per post
    3. looks_3 romus with 0.7 thanks per post
    4. looks_4 userque with 0.7 thanks per post
    1. trending_up 48,641 views
    2. thumb_up 158 thanks given
    3. group 44 followers
    1. forum 132 posts
    2. attach_file 66 attachments




 
Search this Thread

Strategy Builder for Non-Programmers NO CODE

  #91 (permalink)
userque
Chicago IL
 
Posts: 180 since Apr 2016
Thanks Given: 573
Thanks Received: 130


romus View Post
Thank you for your input.
You have already posted your 4 sets the way they should be (I think) - and I suspect this is about addressing the Doji once only (per body colour), not twice .
I have run a test on the strategy and it worked - just whether it is the right way - not sure and willing to understand more.





After you fix sets 3 and 4, we can move on to set 5. If you change set 5, please post a new screen shot.

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
Exit Strategy
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
How to apply profiles
Traders Hideout
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
22 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #92 (permalink)
 romus 
Melbourne, VIC, Australia
Legendary Wicked Trader
 
Experience: Intermediate
Platform: NinjaTrader
Trading: SPI
Frequency: Every few days
Duration: Days
Posts: 790 since Dec 2010
Thanks Given: 2,017
Thanks Received: 3,173

@userque,

Wow! What a blunder!









Corrected now.
Any comments in regards to Set 5?

When nothing goes right... go left
Reply With Quote
  #93 (permalink)
userque
Chicago IL
 
Posts: 180 since Apr 2016
Thanks Given: 573
Thanks Received: 130



romus View Post
@userque,

Wow! What a blunder!

Corrected now.
Any comments in regards to Set 5?

Looks to be logically proper. Whether it's doing what you intend ... depends on exactly what you intend for it to do.

If you let me know what you intend for it to do, in English; then I can then check whether the code is doing that.

Absent that additional information from you, I'd guess it's ok.

Reply With Quote
Thanked by:
  #94 (permalink)
 romus 
Melbourne, VIC, Australia
Legendary Wicked Trader
 
Experience: Intermediate
Platform: NinjaTrader
Trading: SPI
Frequency: Every few days
Duration: Days
Posts: 790 since Dec 2010
Thanks Given: 2,017
Thanks Received: 3,173

@userque,

Basically, it is to test for the scenario when current bar closes equal or higher to previous bar high AND the real body of the current bar is greater than the previous bar.







Then, how long does it last - 1 bar, 2 bars etc.

In current state, the attached RB2RBL strategy (in incorrect state, as picked by you) actually picks up and "trades" ANY bar colour or Doji - just compares their size of real body.

I may try variations of that and test only by the same body colour (like in second snapshot).

Is it OK to use "<=" in conditions set 2 and 4 or it should strictly be "<", like in your sets?
Or no difference for NT to understand it?

When nothing goes right... go left
Reply With Quote
  #95 (permalink)
userque
Chicago IL
 
Posts: 180 since Apr 2016
Thanks Given: 573
Thanks Received: 130


romus View Post
@userque,

Basically, it is to test for the scenario when current bar closes equal or higher to previous bar high AND the real body of the current bar is greater than the previous bar.







Then, how long does it last - 1 bar, 2 bars etc.

With more code etc., you can use the NT optimizer to "answer" that question. Not sure if it can be coded with just the SB, I'd have to think about it longer to answer that question; but off the top of my head--I think it can.

I use this sort of thing sometimes. I call it a TIME STOP. It's a stop based on the number of bars since entry, and not price levels. I would use it along with traditional price level stops.

Maybe try the thread in this site where someone says they will code indicators for free?


romus View Post
In current state, the attached RB2RBL strategy (in incorrect state, as picked by you) actually picks up and "trades" ANY bar colour or Doji - just compares their size of real body.

I may try variations of that and test only by the same body colour (like in second snapshot).

Is it OK to use "<=" in conditions set 2 and 4 or it should strictly be "<", like in your sets?
Or no difference for NT to understand it?

As your code currently exists, it "makes no difference." HOWEVER, the way you did it was not proper. The way I did it was more proper.

The way you did it originally allows a situation where TWO sets (of the first four) would be true at the same time. This would have occurred when the open and the close are equal.

The way I did it allows for only one set (of the first four) to be true at a time.

The way you did it can lead to difficult to diagnose and fix bugs should you decide to expand you code/strategy; and, it's a poor habit to develop as a coder.

Like I said, in your small example, it makes no actual difference; but it's just not the logical thing to do.

Reply With Quote
Thanked by:
  #96 (permalink)
userque
Chicago IL
 
Posts: 180 since Apr 2016
Thanks Given: 573
Thanks Received: 130


romus View Post
@userque,

Basically, it is to test for the scenario when current bar closes equal or higher to previous bar high AND the real body of the current bar is greater than the previous bar.

Forgot to answer the original question.

Yes, as I recall, the code does what you intended it to do.

Reply With Quote
Thanked by:
  #97 (permalink)
 romus 
Melbourne, VIC, Australia
Legendary Wicked Trader
 
Experience: Intermediate
Platform: NinjaTrader
Trading: SPI
Frequency: Every few days
Duration: Days
Posts: 790 since Dec 2010
Thanks Given: 2,017
Thanks Received: 3,173

@userque,
I have changed set 2 and 4 as per your example - as I understand there is no need to test Doji to Doji difference.

Thank you for your help.

When nothing goes right... go left
Reply With Quote
Thanked by:
  #98 (permalink)
userque
Chicago IL
 
Posts: 180 since Apr 2016
Thanks Given: 573
Thanks Received: 130


romus View Post
@userque,
I have changed set 2 and 4 as per your example - as I understand there is no need to test Doji to Doji difference.

Thank you for your help.

You're welcome.

It's irrelevant now, since you corrected your code. But I forgot to mention, for the record, that having unnecessary/redundant code not only adds difficulty to troubleshooting; it also slows down code execution. (It doesn't matter much with smaller programs like yours, but small programs have a tendency to one day become, big programs )

Reply With Quote
Thanked by:
  #99 (permalink)
 romus 
Melbourne, VIC, Australia
Legendary Wicked Trader
 
Experience: Intermediate
Platform: NinjaTrader
Trading: SPI
Frequency: Every few days
Duration: Days
Posts: 790 since Dec 2010
Thanks Given: 2,017
Thanks Received: 3,173

@userque,

Oh, yes, simplicity is the key.

When nothing goes right... go left
Reply With Quote
Thanked by:
  #100 (permalink)
 jmont1 
New York, NY
 
Experience: Intermediate
Platform: NinjaTrader8
Broker: Data = Rithmic -- Gives 70 Level II Data
Trading: 6C (Low Margin,) 6E, CL, GC, ES and Maybe DX for smaller tick value
Posts: 1,394 since May 2011
Thanks Given: 1,719
Thanks Received: 1,019



romus View Post
@userque, I have changed set 2 and 4 as per your example - as I understand there is no need to test Doji to Doji difference.

Thank you for your help.

@romus, please post your current version so we can review it and possibly assist in expanding its capability.

Started this thread Reply With Quote




Last Updated on November 16, 2021


© 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