NexusFi: Find Your Edge


Home Menu

 





Buy within a number of bars after entry signal (EL)?


Discussion in EasyLanguage Programming

Updated
    1. trending_up 2,972 views
    2. thumb_up 3 thanks given
    3. group 2 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

Buy within a number of bars after entry signal (EL)?

  #1 (permalink)
LeonTaiwan
Taichung Taiwan
 
Posts: 3 since Mar 2021
Thanks Given: 1
Thanks Received: 1

Howdy

I have searched the forum and couldn't find an answer. I would like to know if it is possible to buy within a certain number of bars after your entry signal? For example...I would like to buy after my signal within the next 4 bars after the signal, if not cancel the order. This is for Easylanguage on Tradestation.

Thanks you in advance

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
Trade idea based off three indicators.
Traders Hideout
How to apply profiles
Traders Hideout
Better Renko Gaps
The Elite Circle
REcommedations for programming help
Sierra Chart
 
  #2 (permalink)
 
bobwest's Avatar
 bobwest 
Western Florida
Site Moderator
 
Experience: Advanced
Platform: Sierra Chart
Trading: ES, YM
Frequency: Several times daily
Duration: Minutes
Posts: 8,172 since Jan 2013
Thanks Given: 57,501
Thanks Received: 26,292


LeonTaiwan View Post
Howdy

I have searched the forum and couldn't find an answer. I would like to know if it is possible to buy within a certain number of bars after your entry signal? For example...I would like to buy after my signal within the next 4 bars after the signal, if not cancel the order. This is for Easylanguage on Tradestation.

Thanks you in advance

This sounds like a straightforward job of EL programming, if anyone is willing to give @LeonTaiwan a hand with it.

The question was transferred here from the "ask any question" thread, to give it more visibility.

Bob.

When one door closes, another opens.
-- Cervantes, Don Quixote
Reply With Quote
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629


LeonTaiwan,

welcome to futures.io. If I understand your request correctly this sounds like storing the value of CurrentBar within a variable when your signal is detected might be what you are looking for. Then you can use this variable in checking how many bars ago your signal was present when you issue the order.

Orders will get cancelled automatically if you do not issue them again upon the next code calculation, which is exactly what you would be using your new variable for i.e. conditionally issuing the order when the signal is not too old only.

Regards,

ABCTG



LeonTaiwan View Post
Howdy

I have searched the forum and couldn't find an answer. I would like to know if it is possible to buy within a certain number of bars after your entry signal? For example...I would like to buy after my signal within the next 4 bars after the signal, if not cancel the order. This is for Easylanguage on Tradestation.

Thanks you in advance


Follow me on Twitter Reply With Quote
Thanked by:
  #4 (permalink)
LeonTaiwan
Taichung Taiwan
 
Posts: 3 since Mar 2021
Thanks Given: 1
Thanks Received: 1

Thank you for the reply. Is there anywhere you can direct me regarding the code to store the value of Currentbar in a variable? I am not all that familiar with coding, although trying to learn

Reply With Quote
  #5 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

LeonTaiwan,

you might benefit from going over at least some of the basics (like declaring variables etc.). The following links should get you going:




Regards,

ABCTG



LeonTaiwan View Post
Thank you for the reply. Is there anywhere you can direct me regarding the code to store the value of Currentbar in a variable? I am not all that familiar with coding, although trying to learn


Follow me on Twitter Reply With Quote
Thanked by:




Last Updated on July 4, 2022


© 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