Minneapolis
Posts: 4 since Nov 2016
Thanks Given: 1
Thanks Received: 0
|
I am using a demo account to test some EasyLanguage buy/sell strategies. I have some logic and if that is true, I will enter a long at a limit buy next bar. Outside of the logic, I have my SetProfitTarget(1000) and SetStopLoss(400) statements which I was informed will only execute if I have a position (i.e. if the logic above is true and the buy limit order was sent AND filled).
Basically my problem is that my initial orders seem to be going through the simulation and my stop/profit orders go through the demo account. Under trade strategy manager (where I am setting parameters for the strategy) I have the order execution going through the server (not sim) and the demo account is listed.
Attached is a screen shot to display the problem. In "strategy orders" you can see the initial short went through "sim" but the stop/profits are sitting in the demo account (which lists no position under the positions section). Also, the initial short was sent in previously (since it is sim I am assuming that it looks for historical entries).
Also in my program I am printing to the log a few things to help debug. The accountID info says the demo account, market position and current shares will print 1 if the sim is long (i.e. the marketposition prints out -1 or 1 even when my workspace says no position).
Has anybody encountered this problem before? I am using Apex Trader. I haven't had much experience with EasyLanguage but I can't seem to find anything on this subject (couldn't find how to define the account inside of the EL strategy for example). Any help is much appreciated. Thanks for your time!
|