NexusFi: Find Your Edge


Home Menu

 





Perrys Trading -> Strategy - development


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one MWinfrey with 52 posts (163 thanks)
    2. looks_two wgreenie with 48 posts (18 thanks)
    3. looks_3 porpor1234 with 18 posts (0 thanks)
    4. looks_4 fusion with 15 posts (9 thanks)
      Best Posters
    1. looks_one Braulio with 3.4 thanks per post
    2. looks_two MWinfrey with 3.1 thanks per post
    3. looks_3 max-td with 0.9 thanks per post
    4. looks_4 wgreenie with 0.4 thanks per post
    1. trending_up 93,750 views
    2. thumb_up 247 thanks given
    3. group 61 followers
    1. forum 259 posts
    2. attach_file 95 attachments




 
Search this Thread

Perrys Trading -> Strategy - development

  #151 (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

moin,

i looked into the code of the last posted version of the signal-indicator
and extracted the conditons + actions for setup1 out of it.

the orange lines are comments to explain what is done there,
the blue things are the code itself.

maybe this helps for non-coders to have a look at it
+ to compare the conditions to what they see on the charts
also for the understanding of the rules how the indicator is making its decissions.

maybe this way its easier to find out if we all have the same interpretation of the main original Perry-rules
compared to the coded condition in the indicator.
and to see if the code is done like the rules want it to be.
and to see if the code really DOES what he is suposed to do

cause something is not in sync yet it seems.

this is only for longs for setup1 now - if wished i can do the same for shorts and/or setup2.
but for now i think its easier to follow this if we do it step by step or separatly.


 
Code
                            
    if (    setup1    )         //  if setup 1 is set to true
            
{
                if   (

               
                    
Rising(sMALong)     // long EMA going up
&&    
                  
                    
Rising(sMAMid)       // mid EMA going up
&&
                  
                    
sMAShort[0] > sMAShort[1] && sMAShort[1] > sMAShort[2]   
                                                                     
// short EMA going up at least two bars
 
&&



                    
low <= sMAShort[0]  
&&
                    
high sMAMid[0]         // The Setup bar LOW must be LESS than or touching
                             //the EMA(5) and the Setup bar HIGH must be greater than the EMA(20).
&&
                 
                    
sForce[0] == 1      // Force is green
&&
                    
close open       // up Bar



                    
)

                   
//  if all the above conditiuons are true the indicator does the following things : 
                  //    uses   BarColor = UpColor + Draws a BLACK line + plays a sound

                
{

                    
SU1_Long.Set(sMALong[0])         //    BarColor = SU1_UpColor;

     
DrawLine("entry1"+CurrentBar,4,MAX(High,5)[0]+(1*TickSize),0,MAX(High,5[(1*TickSize),Color.Black,DashStyle.Solid,2);

                    if (
audibleAlertPlaySound(soundFile);







         
//  and if in addition the following things are true it paints a up-Color-line - Green i think
                   
              
if (         


                        
Rising(sADX)             // ADX Rising     
 
&&        
                      
                        
Rising(sDMIPlus)         // Rising DMI
 
&&
                    
                        
sDMIPlus[0] > sDMIMinus[0])         // DMI Green



                    
{
       
DrawLine("entry1"+CurrentBar,4,MAX(High,5)[0]+(1*TickSize),0,MAX(High,5)[0]+(1*TickSize),SU1_UpColor,DashStyle.Solid,2);
                    }
       
    } 

-

max-td
Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Online prop firm The Funded Trader (TFT) going under?
Traders Hideout
Ninja Mobile Trader VPS (ninjamobiletrader.com)
Trading Reviews and Vendors
Are there any eval firms that allow you to sink to your …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
60 thanks
Funded Trader platforms
37 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #152 (permalink)
 
jdella's Avatar
 jdella 
Concord, NH USA
 
Experience: Intermediate
Platform: Ninja trader
Broker: AMP/CQG
Trading: ES
Posts: 182 since Jun 2009
Thanks Given: 140
Thanks Received: 115


MWinfrey View Post
Thanks to fusion, I think he found an error in the Method 2 rules. I made the change and believe it is correct now.

Mike, just wanted to say, very nice work on this. I have really enjoyed perry's method and to have it so visual is certainly an added help. Thanks for your hard work.
Jeff

Reply With Quote
  #153 (permalink)
 
MWinfrey's Avatar
 MWinfrey 
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
Posts: 1,878 since Jul 2009
Thanks Given: 1,450
Thanks Received: 3,335


DMPlusSignals_v4 addresses the rounding issue talked about several time which apparently is causing confusion. I added a parameter that allows you to either enable or disable the rounding. The parameter is called RoundFastMA. The default is true which means the indicator performs as it has in the past. Set this to false and the rounding is disabled. Hopefully that will reduce the confusion about what is or isn't a signal.

Mike Winfrey

Attached Files
Elite Membership required to download: DMPlusSignals_v4_nt65.zip
Elite Membership required to download: DMPlusSignals_v4_nt7.zip
Reply With Quote
  #154 (permalink)
 
MWinfrey's Avatar
 MWinfrey 
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
Posts: 1,878 since Jul 2009
Thanks Given: 1,450
Thanks Received: 3,335


fusion View Post
Hi Mike,

I have few questions to ask you regarding indicator DMPlusSignals_v3. The attached chart was generated with NT 6.5.

1. The bar is 2nd falling bar; yet, no signal. The readings (1188.79 - two bars before bar 1; 1188.78 - one bar before bar 1) of EMA5 can prove my observation. I’m wondering if there‘s rounding issue here?

2. This bar meets rule of Method 2, Short; but, no signal fired.

3 & 4. Two gravestone doji bars; but, no signals marking here. Please read Perry’s explanation regarding doji---
[COLOR=#0000ff]https://nexusfi.com/journals-daily-charts-chart-reading/3514-perrys-trading-platform-63.html#post71828 post# 630[/COLOR]

5. The bar is 2nd rising bar; yet, no signal. The readings (1186.89 - two bars before bar 1; 1186.92 -one bar before bar 5) of EMA5 can prove my observation. Is there rounding issue here again?

6. Although it is in End Trend zone, it is Setup bar for Method 1, Long, no signal found.

The six cases stated above happen daily; and, I’m not capable of solving the problem. I present them here are mainly for discussion; and, they may be helpful for your further improving the indicator. It is possible that I misunderstand Perry’s rules. However I appreciate your hard work. TIA!






See post

Reply With Quote
Thanked by:
  #155 (permalink)
 fusion 
East Coast
 
Experience: Beginner
Platform: NinjaTrader,
Trading: es
Posts: 83 since Aug 2010
Thanks Given: 272
Thanks Received: 25

Hi max-td,

Thank you so much for presenting a brief lesson (post # 151) for those people, including me. who are eager to learn how to read code.

I know what MA, Force, ADX, DMIPlus and DMIMinus stand for. The problem is the upper case letter "s". For example, what does "s" mean in sMA?

Could you continue your lesson of reading code of Shorts of Setup 1; and, Setup 2, please? TIA!

Attached Thumbnails
Click image for larger version

Name:	Letter s.gif
Views:	254
Size:	5.4 KB
ID:	24187  
Reply With Quote
Thanked by:
  #156 (permalink)
 fusion 
East Coast
 
Experience: Beginner
Platform: NinjaTrader,
Trading: es
Posts: 83 since Aug 2010
Thanks Given: 272
Thanks Received: 25


MWinfrey View Post
DMPlusSignals_v4 addresses the rounding issue talked about several time which apparently is causing confusion. I added a parameter that allows you to either enable or disable the rounding. The parameter is called RoundFastMA. The default is true which means the indicator performs as it has in the past. Set this to false and the rounding is disabled. Hopefully that will reduce the confusion about what is or isn't a signal.

Mike Winfrey

Hi Mike,

Thank you for the newest improved indicator to help nexusfi.com (formerly BMT) members to study Perry method efficiently. My observation shows Doji got no signal even rules were met.

Chart A: Explanation of Doji by Perry. this is the link---
post #630

Chart B: Today's ES, 4 Range, RoundFastMA was set to "false". No Setup bar signals for Doji.

TIA!

Attached Thumbnails
Click image for larger version

Name:	ChartA.gif
Views:	308
Size:	67.5 KB
ID:	24245   Click image for larger version

Name:	ChartB.gif
Views:	277
Size:	48.2 KB
ID:	24247  
Reply With Quote
Thanked by:
  #157 (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

hey fusion,
before i post more conding-things or before you post more of your "observations" i would like you to check + report if the things that you realized in the version 3 are behaving better now in Version 4 -
we need a feedback if the changes solve the points you found!

so please compare those situations you described in this post

with version 3+4 and let us know if you realize changes there.

looking forward to your feedback to this !

max-td
Reply With Quote
  #158 (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

again to fusion,

please have a look at your settings of the force_index and let us know :

- has your force_Index that we see in the chart the same setting / parameter then the force in the Signal-indicator ?
- how are the original Perry-settings for the force_index ? - you have to use these in both then - in the ploting force & in the signal-force !

these things must be clear defined + synced before you seriously check + compare signals or work on a code to find issues + all that stuff. if you compare signals with diff indicator-settings you will have messed up results.

allthough it maybe makes no huge different at the end, that makes no sense.

and it seems that these things are not the OK in your charts.

max-td
Reply With Quote
  #159 (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


fusion View Post
Hi max-td,

Thank you so much for presenting a brief lesson (post # 151) for those people, including me. who are eager to learn how to read code.

I know what MA, Force, ADX, DMIPlus and DMIMinus stand for. The problem is the upper case letter "s". For example, what does "s" mean in sMA?

Could you continue your lesson of reading code of Shorts of Setup 1; and, Setup 2, please? TIA!

the "sMALong[0]" etc are just replacements for the original calculations of these indicators in this case -
you find them a in the upper section of the indicators code.

iE : sMALong.Set ( EMA ( iMAPeriodLong ) [0]);

so you only have to calculate them once at the beginning and you can call this value as sMALong
later in the code again + again without having to calculate it again.

hope thats understandable

max-td
Reply With Quote
  #160 (permalink)
 
MWinfrey's Avatar
 MWinfrey 
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
Posts: 1,878 since Jul 2009
Thanks Given: 1,450
Thanks Received: 3,335


Ok I think the doji deal is fixed. Let's keep whittling at this thing and maybe it'll turn into something useful.

Attached Files
Elite Membership required to download: DMPlusSignals_v5_nt7.zip
Elite Membership required to download: DMPlusSignals_v5_nt65.zip
Reply With Quote




Last Updated on October 21, 2015


© 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