Stay Long until another Trigger Occurs - futures io
futures io

Stay Long until another Trigger Occurs

Discussion in Platforms and Indicators

    1. trending_up 922 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 0 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

Stay Long until another Trigger Occurs

(login for full post details)
  #1 (permalink)
Dallas, TX
Experience: Intermediate
Platform: ToS, TradeGuider, eSignal, AmiBroker
Broker: TD Ameritrade/eSignal
Trading: Stocks
DonStar's Avatar
Posts: 77 since Dec 2011
Thanks: 28 given, 43 received

Dear esteemed & learned Ami-scripters:

I am working on an indicator and I am absolutely banging my head on the wall and going down in flames!

I am trying to create code that will automate the process described below.

If some of you would help me, I would be extremely grateful (and might even get some sleep at night).

I am willing to do the work on this, but I don't know enough AFL to figure it out.

I have read help files, looked at other code, watched YouTube videos, you name it.

Here is what I am trying to do:

1=True 0=False

If Buy =1 today
& Sell & Short & Cover =0
Enter Long Position

If Buy =1 yesterday
& Sell & Short & Cover =0
Stay in Long Position

Test every bar to ensure we Stay in Long Position

If Sell or Short or Cover =1
Exit Long Position
Take action based on which one(x) =1

Test every bar to ensure x=1

If Sell or Short or Cover or Buy =1
Exit x
Take action based on which one(x) now =1

Continue this process until...

Thank you in advance,


Visit my futures io Trade Journal Started this thread Reply With Quote

futures io Trading Community Platforms and Indicators > Stay Long until another Trigger Occurs

Last Updated on January 23, 2015

Upcoming Webinars and Events

NinjaTrader Indicator Challenge!


Your Charts Should Speak To You w/Bob Cometta

Elite only

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


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),
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