I this situation what if the market is below a support point?
Would this just trigger buys for all those orders?
Would this just trigger buys for all those orders?
Quote from flipflopper:
I essesntially want to add a stop and target order once my trade gets executed. Below you can see in simple steps what I want to do.
1. I want to Buy at a moving average.
2. I want to set a target 2 points higher.
3. I want to set a stop 2 points lower.
4. If either stop or target gets hit I want the corresponding target or stop canceled.
This doesn't seem to work though. The targets seem to work but not the stops!?!?
buy("My Buy") next bar (MovingAverageFast) limit;
sell("My Target") entry("My Buy") next bar (MovingAverageFast + 2) limit;
sell("My Target") entry("My Buy") next bar (MovingAverageFast - 2) stop;
Any Easylanguage guys out there have any ideas?
buy("My Buy") next bar (MovingAverageFast) limit;
sell("My Target") from entry("My Buy") next bar (MovingAverageFast + 2) limit;
sell("My Stop") from entry("My Buy") next bar (MovingAverageFast - 2) stop;
Quote from flipflopper:
I was able to resolve this issue. Had to do with having my my stop and target statements in a an if statement that causing problems.
I have another question.
I want my program to wait for 5 bars after any position has been stopped out before initiating any new trades.
Are there any useful functions that can help with this?