Programming third profitable close - futures io
futures io



Programming third profitable close


Discussion in EasyLanguage Programming

Updated
    1. trending_up 734 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 6 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

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

 
Search this Thread
 

Programming third profitable close

(login for full post details)
  #1 (permalink)
edgeseek
Riyadh, Saudi Arabia
 
 
Posts: 5 since Feb 2017
Thanks: 0 given, 0 received

Hey all,

I'm trying to program a strategy to exit on the third profitable close.

But I have had success only to program it to exit on one profitable close only.

Would appreciate the help if any..
 
Code
If marketposition = 1 and  close > entryprice Then
	Sell 1 contract this bar close;

Reply With Quote

Can you help answer these questions
from other members on futures io?
MacdBB V402 NT804 + gradient + pullback not working on N …
NinjaTrader
Eurex Denali vs dxFeed
Sierra Chart
Is there inherently more opportunity in smaller markets?
Traders Hideout
TD Sequential for NT or MW?
Platforms and Indicators
1 min chart v-shape scan help please
ThinkOrSwim
 
 
(login for full post details)
  #3 (permalink)
 ABCTG   is a Vendor
 
 
Posts: 2,264 since Apr 2013
Thanks: 417 given, 1,509 received


edgeseek,

how exactly do you define the "third profitable close", can you provide an example?

Regards,

ABCTG

Follow me on Twitter Reply With Quote
The following user says Thank You to ABCTG for this post:
 
(login for full post details)
  #4 (permalink)
edgeseek
Riyadh, Saudi Arabia
 
 
Posts: 5 since Feb 2017
Thanks: 0 given, 0 received

I would define it as third close larger than entry price:

Close > Entry price .....first profitable close ( do nothing)

Close > Entry Price .... second profitable close ( do nothing)

Close > Entry Price ..... third profitable close (Take as third profitable close)

I hope this explains it clearly

Reply With Quote
 
(login for full post details)
  #5 (permalink)
 ABCTG   is a Vendor
 
 
Posts: 2,264 since Apr 2013
Thanks: 417 given, 1,509 received

edgeseek,

do you mean three bars have to Close above the entry price while you are in a trade?
If that is the case you have to program your own counter. Use a variable and add +1 to it when your condition is met.
Then when the counter variable is >= 3 trigger your exit.

Finally you only have to reset it after the trade, at the beginning of a new trade or when the Close is below your entry price - depending on what you have in mind of course.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
 
(login for full post details)
  #6 (permalink)
edgeseek
Riyadh, Saudi Arabia
 
 
Posts: 5 since Feb 2017
Thanks: 0 given, 0 received

That is exactly what I was thinking. If you can please explain how to setup the variable and the counter variable I have googled a lot and couldn't find anything specific related to this.

Reply With Quote
 
(login for full post details)
  #7 (permalink)
 ABCTG   is a Vendor
 
 
Posts: 2,264 since Apr 2013
Thanks: 417 given, 1,509 received

edgeseek,

I would suggest to take a look at the EL Essentials PDF, this will cover a lot of the required basics.

Post the code you did so far based on the possible solution I wrote and I will gladly look it and steer you in the right direction.

Regards,

ABCTG

Follow me on Twitter Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > Programming third profitable close


Last Updated on February 20, 2017


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Our 12-year anniversary w/ $$,$$$ prizes (check soon)

August
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), 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