Stay Long until another Trigger Occurs - AmiBroker | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > AmiBroker

Stay Long until another Trigger Occurs
Started:January 23rd, 2015 (05:06 PM) by DonStar Views / Replies:333 / 0
Last Reply:January 23rd, 2015 (05:06 PM) Attachments:0

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • 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, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

Stay Long until another Trigger Occurs

Old January 23rd, 2015, 05:06 PM   #1 (permalink)
Elite Member
Dallas, TX
Futures Experience: Intermediate
Platform: ToS, TradeGuider, eSignal, AmiBroker
Broker/Data: TD Ameritrade/eSignal
Favorite Futures: Stocks
DonStar's Avatar
Posts: 68 since Dec 2011
Thanks: 28 given, 40 received

Stay Long until another Trigger Occurs

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,


Reply With Quote

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > AmiBroker > Stay Long until another Trigger Occurs

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Corey Rosenbloom: Tips, Tactics, and Real Trades: Trading Intraday Trend Reversals

Elite only

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
A Great Setup Occurs... srgtroy Traders Hideout 5 October 15th, 2014 02:23 PM
If an transaction occurs BELOW the bid vrs AT the bid a bullish or bearish move Angelo1 Index Futures Trading 4 April 10th, 2014 11:00 PM
Not able to pull the trigger Mephistophilis Psychology and Money Management 21 June 11th, 2012 01:46 AM
Volume Trigger joe11 NinjaTrader 1 November 1st, 2010 12:47 PM
Looking for a simple MACD strategy. MACD Xover LONG, go LONG roshareid NinjaTrader Programming 2 April 11th, 2010 08:05 PM

All times are GMT -4. The time now is 05:33 PM.

Copyright © 2016 by 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 2016-10-20 in 0.06 seconds with 19 queries on phoenix via your IP