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
|