entryprice = 0 when using set percent trailing - EasyLanguage Programming | futures io social day trading
futures io futures trading


entryprice = 0 when using set percent trailing
Updated: Views / Replies:774 / 4
Created: by hangtime15 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 90,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
 

entryprice = 0 when using set percent trailing

  #1 (permalink)
Trading Apprentice
Hong Kong
 
Futures Experience: Beginner
Platform: multicharts
Favorite Futures: Stocks, futures
 
Posts: 1 since May 2015
Thanks: 0 given, 0 received

entryprice = 0 when using set percent trailing

Hello I am a beginner to MC and I have experienced the following problem when using the setpercenttrailing function

when I writing the code below


SetPercentTrailing( entryprice(0)* 1.1, 50 ) ;



the entry price is always 0 and will trigger the sell order right after buy in

can anyone can help me with this?
Thanks a lot.

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary


hangtime15,

I would suggest that you take a look at the MC help file and the explanation of SetPercentTrailing. From the code snippet I am under the impression you did not code what you have in mind. So curing the situations where entryprice(0) = 0 might not help you out.

Regards,
ABCTG


hangtime15 View Post
Hello I am a beginner to MC and I have experienced the following problem when using the setpercenttrailing function

when I writing the code below


SetPercentTrailing( entryprice(0)* 1.1, 50 ) ;



the entry price is always 0 and will trigger the sell order right after buy in

can anyone can help me with this?
Thanks a lot.


Reply With Quote
 
  #4 (permalink)
Trading Apprentice
Kazan russia
 
Futures Experience: Intermediate
Platform: QST
Broker/Data: Vision
Favorite Futures: CL
 
Posts: 31 since Dec 2013
Thanks: 2 given, 5 received


hangtime15 View Post
Hello I am a beginner to MC and I have experienced the following problem when using the setpercenttrailing function

when I writing the code below


SetPercentTrailing( entryprice(0)* 1.1, 50 ) ;



the entry price is always 0 and will trigger the sell order right after buy in

can anyone can help me with this?
Thanks a lot.

setpercenttrailing is a macro command with 1 input parametr in dollar risk value! set up only once in any place of code!
try to use this
setstopposition;
mp=marketposition;
ep=entryprice;
if mp=1 then SetPercentTrailing( (ep* 1.1 ) );

Reply With Quote
 
  #5 (permalink)
Trading Apprentice
Brisbane, Australia
 
Futures Experience: Advanced
Platform: MC
Broker/Data: LMAX
Favorite Futures: FX, Equities
 
Posts: 7 since Jan 2013
Thanks: 14 given, 0 received


hangtime15 View Post
Hello I am a beginner to MC and I have experienced the following problem when using the setpercenttrailing function

when I writing the code below


SetPercentTrailing( entryprice(0)* 1.1, 50 ) ;



the entry price is always 0 and will trigger the sell order right after buy in

can anyone can help me with this?
Thanks a lot.

If you're not having any luck with EntryPrice( 0 ) you could try OpenEntryPrice( 0 ) - the difference is the first references the position (i.e. a zero references the open position, whereas a 1 is the previous position), and the second references trades (i.e. a zero references the first trade in an open position, a 1 references the 2nd trade etc).

You should also look up the difference between SetStopPosition, SetStopContract and SetStopShare which should be added before your SetPercentTrailing code. Based on your code i think SetStopContract is what you're after (by default SetStopPosition is applied). Your code "entryprice(0)* 1.1" suggests a position size of 1 contract and a profit threshold of 110%.

Finally another thing I learned using SetBreakEven and SetPercentTrailing is you should not have them nested within any other code (e.g. IF ... THEN SetPercentTrailing() )

Good luck!

Reply With Quote

Reply



futures io > > > > > entryprice = 0 when using set percent trailing

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to set trailing stop to be two ticks below the low>> HELP! budfox NinjaTrader Programming 22 September 26th, 2016 02:55 AM
Trailing stop set up for Ninja, any help would be appriated, thanks. hector24 NinjaTrader 1 November 21st, 2014 05:05 AM
Ned help on how to set up a custom trailing stop on Ninja, thanks. hector24 NinjaTrader 6 November 6th, 2014 01:55 PM
How to set a dinamic stop loss based on percent Astrogirl NinjaTrader Programming 11 October 20th, 2013 10:22 AM
EntryPrice vs. ExitPrice ivanyu MultiCharts 1 September 29th, 2013 10:26 AM


All times are GMT -4. The time now is 01:38 AM.

Copyright © 2017 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 2017-12-16 in 0.09 seconds with 19 queries on phoenix via your IP 23.22.136.56