Strategy getting out of sync with real market position - futures io
futures io futures trading



Strategy getting out of sync with real market position


Discussion in EasyLanguage Programming

Updated by vmodus
    1. trending_up 187 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 3 replies
    2. attach_file 1 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Strategy getting out of sync with real market position

(login for full post details)
  #1 (permalink)
Israel
 
 
Posts: 2 since May 2020
Thanks: 0 given, 1 received

for some reason i see that the strategy has a position filled, but no position was filled. i guess it is because the the price reaching the BUY STOP during not regular trading hours, or maybe it has to do with IOG=TRUE. but not sure.

thanks to anyone that can help with this issue.

[IntrabarOrderGeneration = true]

Inputs:
Length(9),
Mult(1.25),
Capital(0),
Risk(100);

Vars:
MP(0),
kcUPband(0), kcDNband(0),
bbUPband(0), bbDNband(0),
dcUPband(0), dcDNband(0),
upBand(0), dnBand(0),
AvgBand(0),
VolGap(0),
VolShares(0),
QtyShares(0),
Split(0),
nShares(0);

MP = MarketPosition;
kcUPband = KeltnerEMA(C,Length,Mult);
kcDNband = KeltnerEMA(C,Length,-Mult);
bbUPband = BollingerBand(C,Length,Mult);
bbDNband = BollingerBand(C,Length,-Mult);
dcUPband = Highest(H,Length);
dcDNband = Lowest(L,Length);

upBand = minlist(kcUPband,bbUPband,dcUPband[1]);
dnBand = maxlist(kcDNband,bbDNband,dcDNband[1]);
AvgBand = (upBand+dnBand)/2;

if MP = 0 then
begin
VolGap = upBand-AvgBand;
if Capital <> 0 then
begin
VolShares = round(Risk/VolGap,0);
QtyShares = round(Capital/C,0);
nShares = minlist(VolShares,QtyShares);
end
else
nShares = round(Risk/VolGap,0);
Split = nShares/3;
buy next bar nShares shares at upBand stop;
end;

if MP = 1 then
begin
sell ("Exit") next bar at AvgBand stop;
sell Split shares total next bar at entryprice+VolGap*1.5 limit;
sell Split shares total next bar at entryprice+VolGap*3 limit;
end;

Reply With Quote

 
 
(login for full post details)
  #2 (permalink)
Legendary Market Wizard
Somewhere, Delawhere, USA
 
Experience: Intermediate
Platform: TradeStation,Sierra Chart
Broker: Tradestation Securities
Trading: My kids, VX, Eurodollar
 
vmodus's Avatar
 
Posts: 612 since Feb 2017
Thanks: 1,186 given, 1,181 received

Can you provide the timeframe of the chart and the instrument? I may be able to assist.

~vmodus

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #3 (permalink)
Israel
 
 
Posts: 2 since May 2020
Thanks: 0 given, 1 received




The issue occured during premarket (6/30/2020), after i logged in to tradestation.
i assume it was because of IOG. but not sure. another thing is that "Strategy Time Filled" is always 11:00pm. but i guess it's because I'm on daily timeframe.

anyway, thanks for your help.

Reply With Quote
The following user says Thank You to 9ypmhphony for this post:
 
(login for full post details)
  #4 (permalink)
Legendary Market Wizard
Somewhere, Delawhere, USA
 
Experience: Intermediate
Platform: TradeStation,Sierra Chart
Broker: Tradestation Securities
Trading: My kids, VX, Eurodollar
 
vmodus's Avatar
 
Posts: 612 since Feb 2017
Thanks: 1,186 given, 1,181 received

The IOG=True setting means you are evaluating the criteria every tick, but your order will be placed at the close of the bar. I'm wondering if you are sending an order to the market when it is closed and TS is rejecting it because it is closed. I don't work with daily charts, so I'm not that much of a help.

You might want to pose your question in the TradeStation community forums.

~vmodus

Visit my futures io Trade Journal Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > Strategy getting out of sync with real market position


July 1, 2020


Upcoming Webinars and Events
 

Every journal equals ten meals for the hungry

Now
     



Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts