I hope someone can shed a bit of light on this.
Issue:
I can see the code entering orders, but no trades are being closed.
Code: Select all
Variables:
int TradeCount(0),
string TradeString ("1");
TradeCount += 1;
TradeString = NumToStr(TradeCount,0);
Buy( TradeString ) 1 share next bar at market;
Sell("Profit") from entry ( TradeString ) 1 share next bar at close * 1.3 limit ;
Sell("Stop") from entry ( TradeString ) 1 share next bar at close *.7 stop ;
The stop loss line/profit line is where orders should be getting executed.
The idea is to enter each bar and exit with a 30% stop or 30% profit.
Entry trade number, for example, Entry #001, should link/match with its closing stop from entry and should be Entry #001.