NexusFi: Find Your Edge


Home Menu

 





barssinceentry


Discussion in MultiCharts

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




 
Search this Thread

barssinceentry

  #1 (permalink)
alexbellinzona
Lugano Switzerland
 
Posts: 11 since Apr 2016
Thanks Given: 6
Thanks Received: 3

Hi everyone,

I've a little problem with the "barssinceentry" word.

If I write in the code:

if marketposition = 1 and barssinceentry > 10 then sell next bar at market;

In backtesting it works perfectly but when in live trading it does not close any position after 10 bars. I really can not understand what's wrong.

Anyone can help?

Many thanks!!!

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Better Renko Gaps
The Elite Circle
MC PL editor upgrade
MultiCharts
About a successful futures trader who didn´t know anyth …
Psychology and Money Management
How to apply profiles
Traders Hideout
 
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

alexbellinzona,

the code you posted should work fine in backtesting and live trading. Based on that the problem might be related to something else, which is hard to tell without knowing your full code and the exact steps you did to produce this situation.
For example barssinceentry will not rememeber the hístory when you assign a broker position to your signal when you enable the automation. This could lead to something appearing to be off, but without knowing what you did, this is just meant to be an example of what can go wrong and not as explanation.

Regards,

ABCTG

Follow me on Twitter Reply With Quote




Last Updated on December 25, 2016


© 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