EasyLanguage one trade a day - futures io
futures io



EasyLanguage one trade a day


Discussion in MultiCharts

Updated
      Top Posters
    1. looks_one ABCTG with 7 posts (2 thanks)
    2. looks_two nimrodc with 6 posts (0 thanks)
    3. looks_3 kevinkdog with 1 posts (1 thanks)
    4. looks_4 SMCJB with 1 posts (2 thanks)
    1. trending_up 3,524 views
    2. thumb_up 5 thanks given
    3. group 5 followers
    1. forum 16 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,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
 

EasyLanguage one trade a day

(login for full post details)
  #11 (permalink)
nimrodc
israel
 
 
Posts: 7 since Jan 2018
Thanks: 3 given, 0 received

what i am seeing in the debug is that
not only for the first bar of the day date <>date[1]
but also on all others bars

i am checking the values of date and date[1] and for all bars of the day
date show the date for today
date[1] show the date for yesterday

i thought date should show the date for current bar and date[1] should show the date for previous bar

Reply With Quote

Can you help answer these questions
from other members on futures io?
Time Segmented Volume
NinjaTrader
Eurex Denali vs dxFeed
Sierra Chart
Portfolio Management Tool/Software
Psychology and Money Management
For the experts of Metastock
Platforms and Indicators
TD Sequential for NT or MW?
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Webinar: Happy Hour w/Cem Karsan
37 thanks
Avoiding Account Killing Freight Trains
27 thanks
QG mini Natural Gas ( Position size ) calculation
19 thanks
The Beast Slayer, Lances NQ Trading Journal
16 thanks
TST/OneUp/LeeLoo/Earn2Trade
13 thanks
 
(login for full post details)
  #12 (permalink)
 ABCTG   is a Vendor
 
 
Posts: 2,265 since Apr 2013
Thanks: 418 given, 1,510 received

nimrodc,

you would have to post the code snippet you use to check this and the chart timeframe you are applying this to.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
 
(login for full post details)
  #13 (permalink)
nimrodc
israel
 
 
Posts: 7 since Jan 2018
Thanks: 3 given, 0 received



ABCTG View Post
nimrodc,

you would have to post the code snippet you use to check this and the chart timeframe you are applying this to.

Regards,

ABCTG

this is the code

variables:
debug (0),
IntraBarPersist tradesCounter(0);

debug = 1;

[IntraBarOrderGeneration = TRUE]

If Date <> Date[1] then begin
tradesCounter = 0;
Value1 = date;
Value2 = date[1];
if debug = 1 then Breakpoint("checkpoint-1");
end;

i am debugging on SPY 15 min chart

thanks!

Reply With Quote
 
(login for full post details)
  #14 (permalink)
 ABCTG   is a Vendor
 
 
Posts: 2,265 since Apr 2013
Thanks: 418 given, 1,510 received

nimrodc,

I am not sure what you are seeing, but I only see this code executed on the first bar of the date in the debugger.
You can confirm this via the EasyLanguage Print Log by changing your code line with the Breakpoint to
something like: if debug = 1 then Print( BarDateTime.ToString(), "; I am here" ) ;

As the condition Date<>Date1[1] is true on the entire first bar, you will see multiple prints for each first bar of the day. This can be overcome by using an intrabarpersist variable that stores the current date, when Date <> this variable.
Something along the lines of:
 
Code
if Date <> oldDate then
begin
oldDate = Date;
tradeCounter = 0;
end;
Regards,

ABCTG


nimrodc View Post
this is the code

variables:
debug (0),
IntraBarPersist tradesCounter(0);

debug = 1;

[IntraBarOrderGeneration = TRUE]

If Date <> Date[1] then begin
tradesCounter = 0;
Value1 = date;
Value2 = date[1];
if debug = 1 then Breakpoint("checkpoint-1");
end;

i am debugging on SPY 15 min chart

thanks!


Follow me on Twitter Reply With Quote
The following user says Thank You to ABCTG for this post:
 
(login for full post details)
  #15 (permalink)
JBroex
Istanbul
 
 
Posts: 35 since Sep 2020
Thanks: 24 given, 19 received


SMCJB View Post
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;

Just a question, if you only want to take one trade per day, do you need the tradescounter variable?
Can you just not use MP by itself?, for example only take a trade when MP = 0

Thanks!

Reply With Quote
 
(login for full post details)
  #16 (permalink)
 ABCTG   is a Vendor
 
 
Posts: 2,265 since Apr 2013
Thanks: 418 given, 1,510 received

JBroex,

if your strategy exits (during the day) MarketPosition would return 0 again. Using MarketPosition alone might not effectively limit the strategy to one trade a day.

Regards,

ABCTG


JBroex View Post
Just a question, if you only want to take one trade per day, do you need the tradescounter variable?
Can you just not use MP by itself?, for example only take a trade when MP = 0

Thanks!


Follow me on Twitter Reply With Quote
 
(login for full post details)
  #17 (permalink)
dbreen1
San Antonio
 
 
Posts: 8 since Feb 2020
Thanks: 1 given, 10 received

It should depend on whether your trying to trade only during margin times ( 0700 to 1500 ) or if your holding from 0000 to 2459. If your trying to buy at session open the problem is the futures sessions begin at 1600 and carry over into the next day so using date RW alone wont work. if your trying to close out during normal hours try if time < 1459 then. nut im not sure exactly when you want to buy in and out

Reply With Quote


futures io Trading Community Platforms and Indicators MultiCharts > EasyLanguage one trade a day


Last Updated on January 12, 2021


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing

Your Charts Should Speak To You w/Bob Cometta

Elite only
 

Our 12-year anniversary w/ $$,$$$ prizes (check soon)

August
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), 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