NexusFi: Find Your Edge


Home Menu

 





Targets + Stops


Discussion in Psychology and Money Management

Updated
      Top Posters
    1. looks_one Big Mike with 3 posts (8 thanks)
    2. looks_two MXASJ with 3 posts (4 thanks)
    3. looks_3 zeller4 with 3 posts (0 thanks)
    4. looks_4 max-td with 2 posts (5 thanks)
      Best Posters
    1. looks_one Neal with 7 thanks per post
    2. looks_two Big Mike with 2.7 thanks per post
    3. looks_3 max-td with 2.5 thanks per post
    4. looks_4 MXASJ with 1.3 thanks per post
    1. trending_up 9,699 views
    2. thumb_up 33 thanks given
    3. group 10 followers
    1. forum 24 posts
    2. attach_file 4 attachments




 
Search this Thread

Targets + Stops

  #21 (permalink)
 zeller4 
Orlando Florida
 
Experience: Intermediate
Platform: NT8
Trading: CL, NQ, ES, RTY
Posts: 477 since Jun 2009
Thanks Given: 1,416
Thanks Received: 404

Hello MXASJ,
I reviewed the code and had the initial thought that I didn't see the arrows displayed.

The arrows needs to be adjusted as follows (or in a similar manner):

 
Code

DrawArrowUp("My up arrow" + CurrentBar, false, 0, Low[0] - 4*TickSize, Color.Lime);
 
Code

DrawArrowDown("My down arrow" + CurrentBar, false, 0, High[0] + 4*TickSize, Color.Red);
other than that, no immediate comments. I don't use market orders in real-life and don't like the NT manner of EnterLong/Short...
I'm trying to get a strat to work with scaling out but using limit entry orders. I'm stuck temporarily until I figure the nuances of coding the NT limit orders / stop orders.

Kirk

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
About a successful futures trader who didnt know anythin …
Psychology and Money Management
What broker to use for trading palladium futures
Commodities
How to apply profiles
Traders Hideout
Trade idea based off three indicators.
Traders Hideout
 
  #22 (permalink)
 MXASJ 
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
Posts: 796 since Jun 2009
Thanks Given: 109
Thanks Received: 800

Thanks Kirk. Yep its a bit buggy. I just deleted a bunch of other stuff in an existing template I use for backtesting and added the Close[0]>Close[1] etc for long/short before posting it. I just tried it on some contracts and its going long only, which my original strat doesn't do.

A better way (if someone wants to step up to the plate) might be random entries (long or short) every x number of bars if marketposition=flat.

Reply With Quote
  #23 (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,465 since Jun 2009
Thanks Given: 33,242
Thanks Received: 101,665


I made a few quick changes. I'd like to work on this more but don't have time right now. The random entries have always been an interesting thing for me as an exercise in money management, but I don't have the extra few minutes right now to code it up

I did make these changes:

 
Code
                            
// GO LONG 
if (Open[0] > Close[1] && Close[0] > High[1]) 
 
Code
                            
// GO SHORT
if (Open[0] < Close[1] && Close[0] < Low[1]) 
I also commented out the if Flat part, because if a new condition for a reversal occurs I want to exit the open trade and enter the new direction.

 
Code
                            
// Only allow entries if we have no current positions open
//if (Position.MarketPosition == MarketPosition.Flat) 
The idea works well in trending periods but obviously fails when market is not trending, which is the majority of time.

Mike



Join the free Markets Chat beta: one platform, all the trade rooms!

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
Attached Thumbnails
Click image for larger version

Name:	2009-09-13_0016.png
Views:	330
Size:	218.4 KB
ID:	2012  
Attached Files
Elite Membership required to download: StopTargetOptimizer2Contract.cs
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #24 (permalink)
 wuolong 
Canada
 
Experience: Intermediate
Platform: NinjaTrader
Posts: 76 since Jul 2009
Thanks Given: 175
Thanks Received: 9

I was testing a commercial auto-trader recently, and it had the similar issue with non-trending market. If I let it run without intervention, all the small profits would erode into big losses due to frequent whipsaws. I am wondering if there is any effective way to tell a non-trendng market.




Big Mike View Post
I made a few quick changes. I'd like to work on this more but don't have time right now. The random entries have always been an interesting thing for me as an exercise in money management, but I don't have the extra few minutes right now to code it up

I did make these changes:

 
Code
                            
// GO LONG 

if (Open[0] > Close[1] && Close[0] > High[1]) 
 
Code
                            
// GO SHORT

if (Open[0] < Close[1] && Close[0] < Low[1]) 
I also commented out the if Flat part, because if a new condition for a reversal occurs I want to exit the open trade and enter the new direction.

 
Code
                            
// Only allow entries if we have no current positions open

//if (Position.MarketPosition == MarketPosition.Flat) 
The idea works well in trending periods but obviously fails when market is not trending, which is the majority of time.

Mike


Reply With Quote
  #25 (permalink)
 
gregid's Avatar
 gregid 
Wrocław, Poland
 
Experience: Intermediate
Platform: NinjaTrader, Racket
Trading: Ockham's razor
Posts: 650 since Aug 2009
Thanks Given: 320
Thanks Received: 623

That's exactly what I was looking for MXASJ! Thanks a lot for the strategy sample!

Reply With Quote




Last Updated on September 14, 2009


© 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