EasyLanguage one trade a day - MultiCharts | futures io social day trading
futures io futures trading


EasyLanguage one trade a day
Updated: Views / Replies:877 / 13
Created: by nimrodc Attachments:0

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 100,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Reply
 
Thread Tools Search this Thread
 

EasyLanguage one trade a day

  #1 (permalink)
israel
 
 
Posts: 7 since Jan 2018
Thanks: 3 given, 0 received

EasyLanguage one trade a day

Hi

i am using the following code to get only one trade a day but the simulation show few trades a day
what am i doing wrong ?

thanks

variables:
tradesCounter(0);

[IntraBarOrderGeneration = TRUE]
If Date <> Date[1] then begin
tradesCounter = 0;
end;

If (marketposition (0) = 0) and (tradesCounter < 1)then begin
Buy ("BUY-LONG") next bar at market;
end;
If marketposition (0) <> 0 then begin
Sell ("STOPLOSS") next bar at EntryPrice - 0.5;
end;
If ( Marketposition(0) <> 0 ) and (Marketposition(1) <> Marketposition(0) ) then tradesCounter = tradesCounter+ 1;
Setexitonclose;

Reply With Quote
 
  #2 (permalink)
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Trading Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 2,084 since Apr 2013
Thanks: 373 given, 1,336 received

nimrodc,

welcome to futures.io. I would suggest to use the Print reserved to check the value that tradesCounter has throughout your code. This will help you in tracking the problem down.
I would also suggest checking (again the print reserved word can be helpful) when your conditional statement "If ( Marketposition(0) <> 0 ) and (Marketposition(1) <> Marketposition(0) )" is true.

Regards,

ABCTG

Follow me on Twitter Visit my Facebook Reply With Quote
 
  #3 (permalink)
Legendary Market Wizard
Houston, TX
 
Trading Experience: Advanced
Platform: XTrader
Broker/Data: Advantage Futures
Favorite Futures: Energy
 
Posts: 3,005 since Dec 2013
Thanks: 2,440 given, 5,395 received


Or, put the counter inside the loop that gets you into the first trade.

 
Code
variables: tradesCounter(0);

[IntraBarOrderGeneration = TRUE]

If Date <> Date[1] then tradesCounter = 0;

If (marketposition = 0 and tradesCounter = 0) then begin 
    Buy ("BUY-LONG") next bar at market;
    tradesCounter = 1
end;

If marketposition = 1 then Sell ("STOPLOSS") next bar at EntryPrice - 0.5 Stop;

Reply With Quote
The following user says Thank You to SMCJB for this post:
 
  #4 (permalink)
Market Wizard
Cleveland Ohio/United States
 
Trading Experience: Advanced
Platform: Tradestation
Broker/Data: Tradestation, DeCarley, others
Favorite Futures: futures
 
Posts: 2,632 since Jul 2012
Thanks: 1,356 given, 5,029 received

Or use EntriesToday reserved word.

Follow me on Twitter Reply With Quote
The following user says Thank You to kevinkdog for this post:
 
  #5 (permalink)
israel
 
 
Posts: 7 since Jan 2018
Thanks: 3 given, 0 received

follow up

thanks all for the replies
i tried this option but still get multiple entries per day in the simulation

does any one have similar code that is tested/works for him

thanks

Reply With Quote
 
  #6 (permalink)
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Trading Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 2,084 since Apr 2013
Thanks: 373 given, 1,336 received

nimrodc,

the code @SMCJB posted should not take more than one trade per date.

Regards,

ABCTG

Follow me on Twitter Visit my Facebook Reply With Quote
 
  #7 (permalink)
israel
 
 
Posts: 7 since Jan 2018
Thanks: 3 given, 0 received


ABCTG View Post
nimrodc,

the code @SMCJB posted should not take more than one trade per date.

Regards,

ABCTG

thanks
i tried it but it didnt work for me...
when debugging the code i saw that

If Date <> Date[1] then tradesCounter = 0;

tradesCounter is set back to 0 although the date didnt change
meaning a new date => tradesCounter is set to 0 then the Buy kicks in but then on next round although we still on same date tradesCounter is set to 0 again

anyone understands why ?

Reply With Quote
 
  #8 (permalink)
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Trading Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 2,084 since Apr 2013
Thanks: 373 given, 1,336 received

nimrodc,

I am not sure I follow you. The condition "Date <> Date[1]" is only true for two bars that have a different date.

As the code @SMCJB posted is using Intrabar Ordergeneration the tradeCounter variable should be declared as intrabarpersist. Otherwise it won't hold its value between the ticks.

Regards,

ABCTG

Follow me on Twitter Visit my Facebook Reply With Quote
 
  #9 (permalink)
israel
 
 
Posts: 7 since Jan 2018
Thanks: 3 given, 0 received


ABCTG View Post
nimrodc,

I am not sure I follow you. The condition "Date <> Date[1]" is only true for two bars that have a different date.

As the code @SMCJB posted is using Intrabar Ordergeneration the tradeCounter variable should be declared as intrabarpersist. Otherwise it won't hold its value between the ticks.

Regards,

ABCTG


the code for declaration was

variables: tradesCounter(0);

anything i am missing or need to add to this so it will be intrabarpersist ?

Reply With Quote
 
  #10 (permalink)
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Trading Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 2,084 since Apr 2013
Thanks: 373 given, 1,336 received


nimrodc,

yes, by default the variable will not be intrabarpersist. This has to be added specifically for each variable.
You can read more about it here: https://community.tradestation.com/wiki/display/EasyLanguage/IntrabarPersist

Regards,

ABCTG


nimrodc View Post
the code for declaration was

variables: tradesCounter(0);

anything i am missing or need to add to this so it will be intrabarpersist ?


Follow me on Twitter Visit my Facebook Reply With Quote
The following user says Thank You to ABCTG for this post:

Reply



futures io > > > > EasyLanguage one trade a day

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)
 

futures io is celebrating 10-years w/ over $18,000 in prizes!

Right now
 

$250 Amazon Gift Cards with our "Thanks Contest" challenge!

Right now
 

Show us your trading desks and win over $5,000 in prizes w/Jigsaw Trading

September
 

The Spirituality of Trading w/Dr Brett Steenbarger

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to code to trade only one time per day in easylanguage lifelikegame MultiCharts 3 July 3rd, 2016 08:54 PM
Help exit a trade in easylanguage! kidvic EasyLanguage Programming 8 June 19th, 2015 03:06 AM
Day trade AND Swing trade the same account/broker ? wwwingman Reviews of Brokers and Data Feeds 8 April 4th, 2014 12:43 PM
EasyLanguage Code to stop strategy for the day skiman721 EasyLanguage Programming 12 June 23rd, 2012 01:18 PM
Emini's Swing trade v day trade kctpac Emini and Emicro Index Futures Trading 0 March 1st, 2011 09:32 AM


All times are GMT -4. The time now is 04:14 AM. (this page content is cached, log in for real-time version)

Copyright © 2019 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