Custom breakeven/takeprofit/trailingstop - MultiCharts | futures io social day trading
futures io futures trading


Custom breakeven/takeprofit/trailingstop
Updated: Views / Replies:773 / 0
Created: by bondstrader Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 100,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Custom breakeven/takeprofit/trailingstop

  #1 (permalink)
Trading Apprentice
Dubai, UAE
 
Futures Experience: Advanced
Platform: Multicharts
Favorite Futures: Gold
 
Posts: 10 since Sep 2014
Thanks: 2 given, 1 received

Custom breakeven/takeprofit/trailingstop

Is there anything wrong with the following code?
What Im trying to do is as follows.
1. Send a long order based on required conditions.
2. Set a breakeven stop if position moves up x number of pips.
3. Set a jump signal (sort of a big one time trailing stop) if position moves certain number of pips in profit.
4. Set a regular stop loss in case position goes into a loss.
5. Set a target profit.
Breakevenstop = 20 pips above entryprice
JumpLong = if price moves 40 pips above entryprice, and JumpLong Stop is set at 30 pips above entryprice at 1.1130
LSVal = 40 pips below entry
CloseLong = 100 pips above entry

So if i buy EUR/USD at 1.1100, and market moves to 1.1120, Breakeven stop is set at entryprice.(1.1100)
If market moves up to jump stop level at 1.1140, Jumplong stop is posted at 1.1130.
If market moves down 40 pips below, LSVal stop is triggered at 1.1060.
If market continues moving up, profit target is hit at 1.1200.

A few issues.
1. However, when I run a backtest on it, it triggers orders sporadically. At times it misses the jumpstop, and eventually goes on to hit the stoploss, even though the jump opportunity came first.
2. I want to use my own code instead of reserved functions (setstoploss, setbreakeven, etc), as I want to add more functionality to my stops. Seems like it this is that is causing the randomness of order triggers. What can i do/change to avoid that?

Apologies if any of this sounds confusing.

 
Code
if marketposition = 0 then begin

if condition1 and condition2 then Buy ("Open-L1") (Lots) contracts Next bar at BuyLimit Limit; //Buy order .

end;

if marketposition = 1 then begin

LBE = entryprice + (BreakevenVal * TickSize);
JumpLong = entryprice + (Jumpstep * TickSize);

if condition3 then begin
	Sell ("Stop-L1") currentcontracts Contracts next bar at LSVal Stop; //Long Stop
end;
if CurrentBid >= LBE then begin
	Sell ("BE-L1") CurrentContracts Contracts Next bar at Entryprice Stop; //BE Long
end;
if CurrentBid - Entryprice >= (JumpStart * TickSize) then begin
	Sell ("Jump-L1") Currentcontracts contracts next bar at JumpLong Stop;//Jump Long
end;
if condition4 then begin
	Sell ("Close-L1") currentcontracts Contracts next bar at CloseLong Limit;  //Long Target
end;
end;

end;

Reply With Quote

Reply



futures io > > > > Custom breakeven/takeprofit/trailingstop

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

September Journal Challenge (sponsored by TopstepTrader)

September

Free Elite Membership: Twitter Tuesday and Facebook Friday!

Tue & Fri
 

5 Top Traits of Market Wizards w/John Hoagland @ TopstepTrader

Sep 25
 

Breaking Down an Equity Trading System: Step-by-step w/RandBots

Sep 27

Anthony Drager (TBD)

Oct 4
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Intense frustration moving to breakeven+1 in NinjaTrader strategy DavidBodhi NinjaTrader Programming 5 May 27th, 2015 08:22 PM
stoploss to breakeven to trailing stephenszpak NinjaTrader Programming 13 October 13th, 2014 03:30 PM
Breakeven -(certain ticks) treated as loss rsmann123 NinjaTrader 1 September 29th, 2011 09:30 PM
Runner Breakeven re entry emini_Holy_Grail Psychology and Money Management 6 May 1st, 2010 08:48 AM
BREAKEVEN + ONE TICK rajafx1 NinjaTrader Programming 1 November 8th, 2009 05:37 PM


All times are GMT -4. The time now is 01:08 AM. (this page content is cached, log in for real-time version)

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2018-09-24 in 0.07 seconds with 14 queries on phoenix