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 49,049 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

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


romus View Post
Variables to compare

I am trying to set variables and just cannot get my head around it in Strategy Builder (not even in Wizard).

What I am trying to do is compare Real Body (0) RB(0) to Real Body (1) RB(1)
e.g.:

If RB (0) > RB (1)
then...

Seems like I am doing it totally wrong way as keep getting errors.

Can anyone get me the start in Strategy Builder?

Based only on what you've said; what you didn't say; and my resulting assumptions :

 
Code
If Math.Abs(Close[0]-Open[0]) > Math.Abs(Close[1]-Open[1])
then...

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Strategy stop orders partially filled
EasyLanguage Programming
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Quantum physics & Trading dynamics
The Elite Circle
What broker to use for trading palladium futures
Commodities
Cheap historycal L1 data for stocks
Stocks and ETFs
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
22 thanks
What is Markets Chat (markets.chat) real-time trading ro …
19 thanks
ApexTraderFunding.com experience and review
14 thanks
GFIs1 1 DAX trade per day journal
12 thanks
EG Indicators
11 thanks
  #72 (permalink)
 romus 
Melbourne, VIC, Australia
Legendary Wicked Trader
 
Experience: Intermediate
Platform: NinjaTrader
Trading: SPI
Frequency: Every few days
Duration: Days
Posts: 798 since Dec 2010
Thanks Given: 2,050
Thanks Received: 3,193


userque View Post
Based only on what you've said; what you didn't say; and my resulting assumptions :

 
Code
If Math.Abs(Close[0]-Open[0]) > Math.Abs(Close[1]-Open[1])
then...

Great as a code - what I am after is to express it in Strategy Builder (NT 8 equivalent to Strategy Wizard).
Some functions still puzzle me and I am using just basic ones I got familiar with.

As told, Variables need to be set first - and this is where I am getting stuck.
I think I am setting them and then try to compare them (e.g. If Var0 > Var1, then...)
ending up with getting Error Message

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



romus View Post
Great as a code - what I am after is to express it in Strategy Builder (NT 8 equivalent to Strategy Wizard).
Some functions still puzzle me and I am using just basic ones I got familiar with.

As told, Variables need to be set first - and this is where I am getting stuck.
I think I am setting them and then try to compare them (e.g. If Var0 > Var1, then...)
ending up with getting Error Message

You don't say what your error message is, but I think I understand better now.

I started with Strategy Builder and still remember some of the tricks I discovered. In this case, I'd create two variables: realBar0 and realBar1 (I think I used Rb0 in my example below).

The trick is to first check for which value is greater between the close and open, for both bars, so you know how to 'do the math,' since the ABS function is not available in strategy builder (SB).

The example below is for bar 0. You can adapt it to add the SETS for bar 1. Then add the sets that compare the Rb0 and Rb1 variables.

sb2


sb3

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

Hi @userque,

Many thanks for your help.
I have tried and no luck - cannot get through this:




How about page 1 - setting variables?
Maybe I am doing something wrong there?

Could you post the settings?

Cheers,
romus.

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


romus View Post
Hi @userque,

Many thanks for your help.
I have tried and no luck - cannot get through this:




How about page 1 - setting variables?
Maybe I am doing something wrong there?

Could you post the settings?

Cheers,
romus.

All the pages prior to the below variable-settings page, are left at their initial settings and unchanged.

You haven't revealed the error message, but maybe you didn't make the variable a double?

sb

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

You got it - I did not.
Will try again.

I was working on a suggestion to set them as Boolean.

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


romus View Post
You got it - I did not.
Will try again.

I was working on a suggestion to set them as Boolean.

I don't follow.

Yours was set to boolean?
Have you tried setting it to double yet?

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

I have set is as Double now - and managed to get the first set!

Sorry, this is as little as I know about this process - hence need one good, working example to hopefully understand it.

When nothing goes right... go left
Reply With Quote
  #79 (permalink)
 romus 
Melbourne, VIC, Australia
Legendary Wicked Trader
 
Experience: Intermediate
Platform: NinjaTrader
Trading: SPI
Frequency: Every few days
Duration: Days
Posts: 798 since Dec 2010
Thanks Given: 2,050
Thanks Received: 3,193

OK, I have them both set up for RB0, now I understand I need to do 2 settings for RB1 - and after that - strategy conditions.

When nothing goes right... go left
Reply With Quote
  #80 (permalink)
 romus 
Melbourne, VIC, Australia
Legendary Wicked Trader
 
Experience: Intermediate
Platform: NinjaTrader
Trading: SPI
Frequency: Every few days
Duration: Days
Posts: 798 since Dec 2010
Thanks Given: 2,050
Thanks Received: 3,193


@userque,
Hmmm, I think that one set might be enough - and then used as Current Bar (0) or one bar ago (1).

I need to try to figure this out.
I would NEVER think that I can put some equation the way you showed me - so THANK YOU!

Previous suggestion to set them as Bool was to compare the bars whether True or False.

When nothing goes right... go left
Reply With Quote
Thanked by:




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