NexusFi: Find Your Edge


Home Menu

 





Question about keeping order alive in Easylanguage


Discussion in Traders Hideout

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




 
Search this Thread

Question about keeping order alive in Easylanguage

  #1 (permalink)
will4
sydney,Australila
 
Posts: 31 since Jun 2017
Thanks Given: 13
Thanks Received: 1

Hi Guys
I have written a program that when I turn on the automated strategy places order 3 points below the market price ,but the problem is that I can not keep the order alive ,it disapears(cancels) on the next bar .can anyone tell me how i can solve this problem ?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
What broker to use for trading palladium futures
Commodities
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
MC PL editor upgrade
MultiCharts
REcommedations for programming help
Sierra Chart
 
  #3 (permalink)
 
SMCJB's Avatar
 SMCJB 
Houston TX
Legendary Market Wizard
 
Experience: Advanced
Platform: TT and Stellar
Broker: Advantage Futures
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,049 since Dec 2013
Thanks Given: 4,388
Thanks Received: 10,207


There are people much better than me at easylanguage here, but let me make an attempt.

Easylanguage code runs at the end of each bar, and orders are sent for the next bar. So in your case it's evaluating bar 1 and sending the order on bar 2. In order for the order to still be active on bar 3, there would have to be something on bar 2 as well.

If you did something like
 
Code
If {trade criteria is met} then myworkorderflag = true;
If myworkorderflag = true then buy next bar at {price} limit;

this will continue working the order as long as myworkorderflag = true and not just for the one bar following the bar that {trade criteria is met}

Reply With Quote




Last Updated on June 30, 2017


© 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