NexusFi: Find Your Edge


Home Menu

 





Stay Long until another Trigger Occurs


Discussion in Platforms and Indicators

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




 
Search this Thread

Stay Long until another Trigger Occurs

  #1 (permalink)
 
DonStar's Avatar
 DonStar 
Dallas, TX
 
Experience: Intermediate
Platform: ToS, TradeGuider, eSignal, AmiBroker
Broker: TD Ameritrade/eSignal
Trading: Stocks
Posts: 77 since Dec 2011
Thanks Given: 28
Thanks Received: 43

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,

Don

Visit my NexusFi Trade Journal Started this thread Reply With Quote




Last Updated on January 23, 2015


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, 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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts