NexusFi: Find Your Edge


Home Menu

 





bool switch... simple..


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one bnichols with 17 posts (3 thanks)
    2. looks_two toddma with 16 posts (0 thanks)
    3. looks_3 ehlaban with 4 posts (2 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 12,387 views
    2. thumb_up 5 thanks given
    3. group 3 followers
    1. forum 37 posts
    2. attach_file 10 attachments




 
Search this Thread
  #11 (permalink)
 
toddma's Avatar
 toddma 
vancouver canada
 
Experience: Intermediate
Platform: multicharts, ninjatrader
Trading: forex
Posts: 53 since Jul 2012
Thanks Given: 14
Thanks Received: 6

Agreed
Your KeltnerChannelLower is the same as mine. I am using MultiCharts.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Need help updating setting in RSqueeze indicator for Nin …
Platforms and Indicators
IB Gateway / IBKR (semi-) daily restart / login
Platforms and Indicators
Top Pick Trading reviews?
Trading Reviews and Vendors
Time, Futures, Scalping, Treasurys
Treasury Notes and Bonds
Anyone Trading Equities using NT8?
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Vinny E-Mini & Algobox Review TRADE ROOM
8 thanks
Futures spread trading grains education sources?
6 thanks
Just another trading journal: PA, Wyckoff & Trends
4 thanks
Wheres the videos?
3 thanks
Blue wave trading review
2 thanks
  #12 (permalink)
 
bnichols's Avatar
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
Posts: 637 since Feb 2010
Thanks Given: 64
Thanks Received: 460

Rgr.

All that leaves is to double check you've parameterized the Keltner indicator on the chart and the function in the signal the same way....

Visit my NexusFi Trade Journal Reply With Quote
  #13 (permalink)
 
toddma's Avatar
 toddma 
vancouver canada
 
Experience: Intermediate
Platform: multicharts, ninjatrader
Trading: forex
Posts: 53 since Jul 2012
Thanks Given: 14
Thanks Received: 6


I use that keltner function in other signals and plot the keltner indicator separately and they always seem to match up. I don't imagine that is the issue. I think I did even try taking it out and using a different requirement for that part. I think I tried RSI, if RSI was below a certain level then it was supposed to turn the TradeClose bool to True. Same issue though.

Started this thread Reply With Quote
  #14 (permalink)
 
bnichols's Avatar
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
Posts: 637 since Feb 2010
Thanks Given: 64
Thanks Received: 460

Alrighty then. When assumption checking fails time to put on our thinking caps.

Can you post 2 things:

1. a screenshot of the entire chart containing the offending trade compressed so that the image contains both the entry and the exit if possible (but not so compressed numbers on the axes are not discernible), but of main interest is the exit, the time axis at the bottom and price axis at the right; and,

2. the instrument your're working with?

I love a puzzle.

Visit my NexusFi Trade Journal Reply With Quote
  #15 (permalink)
 
toddma's Avatar
 toddma 
vancouver canada
 
Experience: Intermediate
Platform: multicharts, ninjatrader
Trading: forex
Posts: 53 since Jul 2012
Thanks Given: 14
Thanks Received: 6

Definitely. Thanks a lot!

Started this thread Reply With Quote
  #16 (permalink)
 
toddma's Avatar
 toddma 
vancouver canada
 
Experience: Intermediate
Platform: multicharts, ninjatrader
Trading: forex
Posts: 53 since Jul 2012
Thanks Given: 14
Thanks Received: 6

The second chart is further back - you can see another 2 instances where it should have triggered the exit.
One around the beginning of the 30th and one on the 25th. The asset is AUDJPY and the timeframe was a 21 minute chart.

*The entry related to the exit we were looking at is on the 29th.

Attached Thumbnails
Click image for larger version

Name:	111.gif
Views:	205
Size:	58.5 KB
ID:	96860   Click image for larger version

Name:	2222.gif
Views:	204
Size:	63.8 KB
ID:	96861  
Started this thread Reply With Quote
  #17 (permalink)
 
bnichols's Avatar
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
Posts: 637 since Feb 2010
Thanks Given: 64
Thanks Received: 460

Aha.

The first thing to notice is that the trade spanned not one but many session boundaries which (given my experience with Interactive Brokers and NT) probably means all bets are off for automated strategies running on platforms designed for retail traders.

I'm a day trader (at least don't leave strategies running overnight because of my experience with IB and NT ) and still learning MC so would have to discover if MC has issues similar to NT, assuming we can rule out IB as the common factor.

In any event clearly it seems the trade should have exited around 4 AM on the 30th of October, soon after the trade was entered (in swing trading terms).

I can understand your confusion but I'm curious why it exited at all since it makes no sense to me unless it was a live trade--in which case it's my experience 3rd party retail platforms tend to fall apart.

Can you confirm it exited automatically (confirm you did not kill it to make the exit) and that this is a backtesting result rather than an actual live trade?

While I assume it's a backtest, if a live trade for the record can you confirm 2 things:

1. whether you tinkered with the signal or the chart or even turned your computer off and back on between Oct 29 (entry) and Dec 8 (exit)?
2. whether your broker is IB?

Tough puzzle. I already know your answer is that it was a backtest

At this point should probably post the....

Disclaimer

All my tests have been on bar intervals likely to give an intraday exit rather than a 21 minute bar interval--the assumption I missed-- and this is probably the key. Should confess I may not be able to help you with this if the strat runs past session close and if so there are 2 choices: close at end of session or wait for someone better informed than I (your future self perhaps!) to parachute in.

If it's a backtest it may be a bug in MC, in which case have to ask are you running 8 or 8.5 (beta). NT at least can handle backtests (screws up in real time). Otherwise I've learned not to trust a retail broker/platform pair for strategies overnight exactly because of insoluble swing trade issues of this sort :-/

Edited to add: That's one reason I use IB's interface (TWS) for swing trades.

Visit my NexusFi Trade Journal Reply With Quote
  #18 (permalink)
 
toddma's Avatar
 toddma 
vancouver canada
 
Experience: Intermediate
Platform: multicharts, ninjatrader
Trading: forex
Posts: 53 since Jul 2012
Thanks Given: 14
Thanks Received: 6

Hmmm interesting..

This was a backtest in MC using IQFeed data. If/when trading live I use MC with IB as my data and broker. I haven't had any issues with multi-day trades in a live environment with MC and IB though.

I just took a look back through the data and found a situation where the entry, the exit trigger (bool) was triggered and the price retraced to the moving average all within the same day and the trade did not exit as it should have (I will post that below).

Yeah it's really quite confusing to me why it exits when it does - it seems to ignore other situations that seem to be equivalent in all respects...

Thanks again for your help on this - maybe I should just try approaching this from a different angle?

Attached Thumbnails
Click image for larger version

Name:	SameDay.gif
Views:	205
Size:	16.0 KB
ID:	96865  
Started this thread Reply With Quote
  #19 (permalink)
 
bnichols's Avatar
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
Posts: 637 since Feb 2010
Thanks Given: 64
Thanks Received: 460

I'm not gone yet...just out of quick solutions

Keep us posted.

Edited to add: perhaps my last words didn't express the passion I feel for a puzzle I can't solve

Visit my NexusFi Trade Journal Reply With Quote
  #20 (permalink)
 
bnichols's Avatar
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
Posts: 637 since Feb 2010
Thanks Given: 64
Thanks Received: 460


For the record here is what I'm seeing (in this case a 21 minute AUD.JPY chart with the signal applied, data courtesy of IB). The entry is slightly different presumably because of the different feed, given the signal MAs (cyan and magenta) are intertwined around the point of entry, but the exit is as expected :-/


Visit my NexusFi Trade Journal Reply With Quote




Last Updated on December 12, 2012


© 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 - Sitemap - Downloads - Top
no new posts