NexusFi: Find Your Edge


Home Menu

 





barssinceentry


Discussion in MultiCharts

Updated
    1. trending_up 1,322 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?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Strategy stop orders partially filled
EasyLanguage Programming
What broker to use for trading palladium futures
Commodities
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
22 thanks
What is Markets Chat (markets.chat) real-time trading ro …
19 thanks
ApexTraderFunding.com experience and review
14 thanks
GFIs1 1 DAX trade per day journal
12 thanks
EG Indicators
11 thanks
  #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