(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.
I'm trying to test a strategy that buys broken pivot levels.
I have the entries working fine, but I am having a very tough time getting the code to allow one trade per setup.
I've attempted to create a variable called buyflag, and when a trade is placed I set it equal to the buy_level_one (broken pivot high). This seems to work in that it allows only one buy, and I would imagine that I'd need to create thousands of these in order to test it over time.
I'm sure there's a simpler way to do this, for example maybe reference the most recent limit price, and I can check for that when placing the trade?
I'm very new to easylanguage and have been banging my head against a wall for a while on this and thought I'd ask for help.
Try this before your order EntriesToday(date) = 0 if you want to only allow one trade a day and if you want to make sure its not taking the trade at the same level as before reference the previous entry price.
if EntryPrice(1) = buy_level_one then no trade!
Last edited by numberjuani; November 21st, 2019 at 07:13 PM.
The following 2 users say Thank You to numberjuani for this post:
Try this before your order EntriesToday(date) = 0 if you want to only allow one trade a day and if you want to make sure its not taking the trade at the same level as before reference the previous entry price.
if EntryPrice(1) = buy_level_one then no trade!
Thanks for the suggestion, I'll mess around with this. I typically do only take one trade per day with this when I trade manually.
Cool dog btw!
edit: also that entryprice reserved word also may work perfectly.
You also can add this filter if you want to open only once a day
//long entry
if
buyflag <> buy_level_one and
buy_level_one > 0 and
close > buy_level_one and
time > starttime and
Closed_Daily <> CloseD(1) and
time < endtime then begin
buy next bar tradesize contracts buy_level_one+(buffer) limit;
buyflag = buy_level_one;
Closed_Daily = CloseD(1);
end;
The following user says Thank You to Germany1960 for this post:
Another option if you want more than 1 trade per day, but only once at a given level might be to add a counter. (caveat, not sure the code below would work without knowing more fully how your entire code operates, so think of it conceptually more than anything)
//long entry
if
buyflag <> buy_level_one and
buy_level_one > 0 and
close > buy_level_one and
time > starttime and
Closed_Daily <> CloseD(1) and
buy_level_one_counter = 0 and
time < endtime then begin
buy next bar tradesize contracts buy_level_one+(buffer) limit;
buyflag = buy_level_one;
Closed_Daily = CloseD(1);
buy_level_one_counter = buy_level_one_counter [1] + 1;
end;