NexusFi: Find Your Edge


Home Menu

 





t+3 order


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one gordon921 with 5 posts (2 thanks)
    2. looks_two ABCTG with 4 posts (3 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 TheTradeSlinger with 1 posts (1 thanks)
    1. trending_up 2,716 views
    2. thumb_up 6 thanks given
    3. group 3 followers
    1. forum 10 posts
    2. attach_file 0 attachments




 
Search this Thread

t+3 order

  #1 (permalink)
gordon921
villejuif
 
Posts: 7 since Oct 2015
Thanks Given: 5
Thanks Received: 2

Hello everybody,

a simple question: I would like to buy/sell not on the day closing, as like: "buy/sell this bar on close" but i want to buy/sell after 3 days. It is possibile? how can i write the code to do this?

Thank you in advance.

Luca

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
MC PL editor upgrade
MultiCharts
ZombieSqueeze
Platforms and Indicators
Increase in trading performance by 75%
The Elite Circle
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
29 thanks
Tao te Trade: way of the WLD
24 thanks
Diary of a simple price action trader
21 thanks
My NQ Trading Journal
14 thanks
GFIs1 1 DAX trade per day journal
10 thanks
  #3 (permalink)
 
TheTradeSlinger's Avatar
 TheTradeSlinger 
Huntington WV
 
Experience: Advanced
Platform: TradeStation
Trading: ES, CL
Posts: 483 since Jun 2015
Thanks Given: 877
Thanks Received: 682



gordon921 View Post
Hello everybody,

a simple question: I would like to buy/sell not on the day closing, as like: "buy/sell this bar on close" but i want to buy/sell after 3 days. It is possibile? how can i write the code to do this?

Thank you in advance.

Luca

You're looking for "BarsSinceEntry", set it to 3 or 2, whatever gives you the 3 days!

Hope this helps, been a while since I've programmed easylanguage.

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
gordon921
villejuif
 
Posts: 7 since Oct 2015
Thanks Given: 5
Thanks Received: 2


TheTradeSlinger View Post
You're looking for "BarsSinceEntry", set it to 3 or 2, whatever gives you the 3 days!

Hope this helps, been a while since I've programmed easylanguage.

Normally i used barssinceentry to exit from my position, for example: "if barssinceentry=exit then buytocover this bar on close", how can i enter in position with a delay of 3 days? Is it possible with "barssinceentry"?

Thanks you for your quick reply.

Luca

Reply With Quote
  #5 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

Luca,

depending on what exactly you want to accomplish you can also use a counter and count the number of days since your entry condition was present within your code. Then when the counter reaches 3 (or what ever threshold) you sent the order. Otherwise what I replied here might work, when you want to actually send the order and keep it on the Tradestation servers:


Regards,

ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #6 (permalink)
gordon921
villejuif
 
Posts: 7 since Oct 2015
Thanks Given: 5
Thanks Received: 2


ABCTG View Post
Luca,

depending on what exactly you want to accomplish you can also use a counter and count the number of days since your entry condition was present within your code. Then when the counter reaches 3 (or what ever threshold) you sent the order. Otherwise what I replied here might work, when you want to actually send the order and keep it on the

Regards,

ABCTG


Hello, i think i've solved my problem (t+3) by structuring the condition to buy/sell 3 days before the trade. I have to enter in position only the friday of all the week, so i decided to check the signal for entry 3 days before, but now i have another problem... how can i enter in position all the friday of the week? Is there a function that allow this ? i tried with "dayofweek" but it's not the correct solution..

Thank you

Luca

Reply With Quote
  #7 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

Luca,

I am not sure if I follow you correctly. Do you want to send the order on Friday for execution on Friday, too?

What is wrong with using DayOfWeek?

Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #8 (permalink)
gordon921
villejuif
 
Posts: 7 since Oct 2015
Thanks Given: 5
Thanks Received: 2


ABCTG View Post
Luca,

I am not sure if I follow you correctly. Do you want to send the order on Friday for execution on Friday, too?

What is wrong with using DayOfWeek?

Regards,

ABCTG


I wish that all the friday the system give me the order. If i use "DayofWeek" like this: " condition9= dayofweek(currentdate)=friday; " i don't know why but it doesn't work correctly. It enter in position when he wants.

Reply With Quote
  #9 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

Luca,

it's hard to tell without knowing your code, but when you use currentdate in your check you will use today's date.
If you run the code on a Friday your condition will be true on every bar, regardless of the date of this bar.

You should use Date instead in the check if you want to use the bar's date instead.

Regards,

ABCTG


gordon921 View Post
I wish that all the friday the system give me the order. If i use "DayofWeek" like this: " condition9= dayofweek(currentdate)=friday; " i don't know why but it doesn't work correctly. It enter in position when he wants.


Follow me on Twitter Reply With Quote
Thanked by:
  #10 (permalink)
gordon921
villejuif
 
Posts: 7 since Oct 2015
Thanks Given: 5
Thanks Received: 2


yees!! Now it works correctly with "date". Thank you very much ABCTG

Reply With Quote
Thanked by:




Last Updated on May 13, 2016


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts