NexusFi: Find Your Edge


Home Menu

 





Set Maximum Trades


Discussion in MultiCharts

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




 
Search this Thread

Set Maximum Trades

  #1 (permalink)
Qw3rty
Johannesburg
 
Posts: 3 since May 2017
Thanks Given: 0
Thanks Received: 0

Hello,

How do I set max open trades to 100?

I have set the signal "Allow up to 100 entry orders in the same direction..... but it's not working.

I am trying to backtest a strategy with multiple open trades but it only ever opens one trade at a time. Can I program this setting into the signal?

Any ideas?

Thank you

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
MC PL editor upgrade
MultiCharts
Better Renko Gaps
The Elite Circle
What broker to use for trading palladium futures
Commodities
Cheap historycal L1 data for stocks
Stocks and ETFs
 
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

Qw3rty,

does the strategy code maybe prevent additional entries?

Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #3 (permalink)
Qw3rty
Johannesburg
 
Posts: 3 since May 2017
Thanks Given: 0
Thanks Received: 0



ABCTG View Post
Qw3rty,

does the strategy code maybe prevent additional entries?

Regards,

ABCTG

This is my entry criteria for entering a buy trade.

//Buy Average
if (close<low_signal and close[1] > high_signal and close[2]>high_signal then buy next bar at market;
setprofittarget(AvgEntryPrice_at_Broker_for_The_Strategy+20);

I have tried using barssinceentry>=0 and also maxentries<100 but no luck.

Any ideas?

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

Qw3rty,

from this code snippet it's hard to tell. You can check with print statements if your entry conditions are valid while you are in a trade. This should tell you if your code is the problem.

What radio button position did you use for the Position limits under the strategy properties? Is it set to "regardless of the entry that generated the order"?

Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #5 (permalink)
Qw3rty
Johannesburg
 
Posts: 3 since May 2017
Thanks Given: 0
Thanks Received: 0


ABCTG View Post
Qw3rty,

from this code snippet it's hard to tell. You can check with print statements if your entry conditions are valid while you are in a trade. This should tell you if your code is the problem.

What radio button position did you use for the Position limits under the strategy properties? Is it set to "regardless of the entry that generated the order"?

Regards,

ABCTG

I have tried a simple SMA cross strategy which I can now backtest and see the trade differences between the 2 different radio buttons. Something must be off with my code.

SMA CODE Example:

INPUTS: PRICE(CLOSE), FASTAVG(9), SLOWAVG(50);
VARS: FASTMA(0), SLOWMA(0), FILTER(0);



FASTMA = AVERAGE(PRICE, FASTAVG);

SLOWMA = AVERAGE(PRICE, SLOWAVG);


IF FASTMA > SLOWMA THEN

BUY THIS BAR ON CLOSE;

IF FASTMA < SLOWMA THEN

SELL THIS BAR ON CLOSE;

Not sure why my code doesn't work unless entering at market is different.

If I use any radio button I always get the same result on the charts. I only see one trade per criteria met? Why is that?

See attached

I should be seeing multiple entries but I only see one per cross

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

Qw3rty,

without seeing your full code one could only guess what is causing it.

As I previously wrote, I'd suggest to use print statements to evaluate what is going within your code.

Regards,

ABCTG

Follow me on Twitter Reply With Quote




Last Updated on May 4, 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