[Condition] IF B happen within a timeframe after A happen, then C - MultiCharts | futures io social day trading
futures io futures trading


[Condition] IF B happen within a timeframe after A happen, then C
Updated: Views / Replies:122 / 7
Created: by FDZL 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
 

[Condition] IF B happen within a timeframe after A happen, then C

  #1 (permalink)
Hong Kong
 
 
Posts: 6 since Feb 2019
Thanks: 1 given, 1 received

[Condition] IF B happen within a timeframe after A happen, then C

Hi all,

If I want to code this :

IF B happen within a timeframe after A happen, then C

How can I code this into powerlanguage please?


Last edited by FDZL; June 4th, 2019 at 02:20 AM.
Reply With Quote
 
  #2 (permalink)
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Trading Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 2,069 since Apr 2013
Thanks: 369 given, 1,316 received

Hi FDZL,

can you show an example to clarify what you mean by "within a timeframe"?

Regards,

ABCTG

Follow me on Twitter Visit my Facebook Reply With Quote
 
  #3 (permalink)
Hong Kong
 
 
Posts: 6 since Feb 2019
Thanks: 1 given, 1 received



ABCTG View Post
Hi FDZL,

can you show an example to clarify what you mean by "within a timeframe"?

Regards,

ABCTG

Hi ABCTG,

Thanks for replying.

For example, if B happen with 1 minute after A = true (and therefore can not use If..and...then statement) , then C;

Is it possible to code this?

Reply With Quote
 
  #4 (permalink)
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Trading Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 2,069 since Apr 2013
Thanks: 369 given, 1,316 received

Hi FDZL,

the approach will depend a bit on the timeframe you are working on. If you are working on one minute bars you could store the value of the reserved CurrentBar in a variable when your code detects condition A.
Then you can compare the current value of CurrentBar against the stored value when you evaluate your condition B.

Regards,

ABCTG


FDZL View Post
Hi ABCTG,

Thanks for replying.

For example, if B happen with 1 minute after A = true (and therefore can not use If..and...then statement) , then C;

Is it possible to code this?


Follow me on Twitter Visit my Facebook Reply With Quote
 
  #5 (permalink)
Hong Kong
 
 
Posts: 6 since Feb 2019
Thanks: 1 given, 1 received


ABCTG View Post
Hi FDZL,

the approach will depend a bit on the timeframe you are working on. If you are working on one minute bars you could store the value of the reserved CurrentBar in a variable when your code detects condition A.
Then you can compare the current value of CurrentBar against the stored value when you evaluate your condition B.

Regards,

ABCTG

Dear ABCTG,

But my case is that condition A is a exit action ( Sell / buy to cover ) and I am not too sure if this can be code into condition....

IE " sell all contract next bar at market " cannot really be coded into condition in multi chart as far as I'm concerned.

Is there any way around this ? Much appreciated for your assistance.

Reply With Quote
 
  #6 (permalink)
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Trading Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 2,069 since Apr 2013
Thanks: 369 given, 1,316 received

FDZL,

do you use any condition to decide when to trigger the exit? If so, use that, too. If not, you could for example monitor the change in the market position (to now being flat) or detect a particular exit name etc.. to set the value of the variable.

Regards,

ABCTG

Follow me on Twitter Visit my Facebook Reply With Quote
 
  #7 (permalink)
Hong Kong
 
 
Posts: 6 since Feb 2019
Thanks: 1 given, 1 received


ABCTG View Post
FDZL,

do you use any condition to decide when to trigger the exit? If so, use that, too. If not, you could for example monitor the change in the market position (to now being flat) or detect a particular exit name etc.. to set the value of the variable.

Regards,

ABCTG

My problem is solved with your set value of the variable advise!

Thank you so much for your kind assistance!

Reply With Quote
The following user says Thank You to FDZL for this post:
 
  #8 (permalink)
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Trading Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 2,069 since Apr 2013
Thanks: 369 given, 1,316 received

FDZL,

you are welcome and thank you for your feedback.

Regards,

ABCTG


FDZL View Post
My problem is solved with your set value of the variable advise!

Thank you so much for your kind assistance!


Follow me on Twitter Visit my Facebook Reply With Quote

Reply



futures io > > > > [Condition] IF B happen within a timeframe after A happen, then C

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

futures io is celebrating 10-years w/ over $18,000 in prizes!

Right now
 

$1,000 in Amazon Gift Cards being given away right now from GFF Brokers

Right now
 

$250 Amazon Gift Cards with our "Thanks Contest" challenge!

Right now
 

Show us your trading desks and win over $5,000 in prizes w/Jigsaw Trading

August
 

Webinar: Suri Duddella (TBA)

Elite only
 

Webinar: Richard Bailey (TBA)

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make a paintbar persist until new condition is true? jackbravo EasyLanguage Programming 1 June 24th, 2016 01:59 PM
link an exit condition to a particular entry condition vegtrip ThinkOrSwim 0 October 12th, 2013 08:49 AM
SetProfitTarget only if my condition is true Ironman9973 NinjaTrader Programming 2 November 20th, 2012 03:36 AM
to get NT to perform an action only once while a strategy condition is true richw NinjaTrader Programming 3 February 28th, 2011 08:38 PM
True High and True Low kaywai NinjaTrader Programming 4 January 20th, 2010 03:09 PM


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

Copyright © 2019 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