NexusFi: Find Your Edge


Home Menu

 





How to develop a short time frame forex bot


Discussion in Traders Hideout

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




 
Search this Thread

How to develop a short time frame forex bot

  #1 (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

1st in an installment, how to migrate your long term (days, months, years) Forex strategy to short term (minutes).

Earlier this evening I was trying to explain NT auto-trading to my son who has never traded. I'm a get-rich-slowly sort (100% / month on paper) and he's young, the get-rich-fast 30-something sort with no platform experience.

We threw up the canned SimpleMAStrategy and backtested on 6 months spot Forex data in NT7.

It performed badly, as expected, so I showed him how to tweak it by unlocking the code to establish his own test bed, make changes, backtest again, and keep backtesting manually until he's ready to optimize.

To make a long story short, I've never been profitable fooling around with SimpleMA or trying to trade the 1 minute spot Forex market by bot, but to my surprise tonight SimpleMA optimized to countertrend trading on 1 minute data, and kept optimizing the same way after repeated tests.

This means apparently the canned strategy is desperate to reverse the roles of fast and slow SMA for 1 minute spot currency data at the moment. Specifically it wants to replace the slow SMA with the bar close and turn the fast SMA into the slow SMA, essentially making the fast crossover of the close the opposite signal (e.g., buy instead of sell and vice versa).

We've all seen this from time to time, but I've never seen anything so robust in short time frame auto-trading.

The bottom line appears to be, SMA in a bot works over the long haul if price action is random (ranging) if you trade counter trend, which it does most of the time, and fails badly if price action begins to trend, which it does 20-30% of the time. No surprises there.

The object of this thread therefore is to decide whether this result is a flash in the pan or otherwise how to determine the onset of trending in 1 minute spot Forex data. I'll share the strategy in the next post, but in the meantime welcome any posts from folks dealing with the same issue.

As usual constructive contributors will own the final bot if it turns out to be profitable, and excuse me it turns out I've badly miscalculated

Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Exit Strategy
NinjaTrader
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Diary of a simple price action trader
26 thanks
Just another trading journal: PA, Wyckoff & Trends
24 thanks
Tao te Trade: way of the WLD
21 thanks
My NQ Trading Journal
19 thanks
HumbleTraders next chapter
9 thanks
  #3 (permalink)
 
torroray's Avatar
 torroray 
Malaysia
 
Experience: Beginner
Platform: Multichart DT
Broker: MB Trading
Trading: Fx
Posts: 272 since Nov 2009
Thanks Given: 52
Thanks Received: 61


Hi,

can you post a screenshot

Reply With Quote
  #4 (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

Will do as soon as I re-stabilize NT7 .... it looks like the infamous "Failed to execute DB job 'ExecutionUpdateJob': ObjectSpace: Entity Object was not Updated - NinjaTrader.Cbi.Execution" error has persisted to Version 7.0.1000.2

Edited to add: this issue started a few hours after I started forward sim testing the short time frame strategy on the EUR.CAD pair while another strategy was running live on same instrument (the strategy that feeds & clothes me :-/). Given the problem NT has with virus checkers I'm getting the feeling NT may have a bug in its file handler(s) (related to locking? race condition?), including the database.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #5 (permalink)
 
torroray's Avatar
 torroray 
Malaysia
 
Experience: Beginner
Platform: Multichart DT
Broker: MB Trading
Trading: Fx
Posts: 272 since Nov 2009
Thanks Given: 52
Thanks Received: 61

Hi,

These small problems still haunting NT.

Reply With Quote
  #6 (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

Just an interim installment. With the original post I meant to show one way strategy backtesting can lie. The idea was to share the solution, with the expectation readers would be wiser.

I already knew the best optimized (apparently profitable) strategy would fail in real-life short time frame spot Forex trading mostly due to spread--it's how Forex brokers make money, after all .

I couldn't continue the chapter without knowing the next chapter--what everybody want's to know--how to make a short time frame Forex bot profitable.

At the time I thought it would be simple. Turns out not to be

You have to know how to trade your instrument in your time frame profitably to program a bot.

Since the first boastful post I've been actively discretionary trading short term spot Forex "with extreme prejudice" to learn how and am only now approaching profitability. It will be a while before I can educate a bot.

Will keep you posted.

Visit my NexusFi Trade Journal Started this thread Reply With Quote




Last Updated on April 10, 2011


© 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