NexusFi: Find Your Edge


Home Menu

 





In AutoTrading is a phantom (dummy) contract and a live (replay) contract possible?


Discussion in Traders Hideout

Updated
      Top Posters
    1. looks_one rpm123 with 4 posts (5 thanks)
    2. looks_two vegasfoster with 1 posts (1 thanks)
    3. looks_3 serac with 1 posts (2 thanks)
    4. looks_4 MrYou with 1 posts (1 thanks)
      Best Posters
    1. looks_one serac with 2 thanks per post
    2. looks_two rpm123 with 1.3 thanks per post
    3. looks_3 MrYou with 1 thanks per post
    4. looks_4 vegasfoster with 1 thanks per post
    1. trending_up 4,009 views
    2. thumb_up 9 thanks given
    3. group 4 followers
    1. forum 7 posts
    2. attach_file 3 attachments




 
Search this Thread

In AutoTrading is a phantom (dummy) contract and a live (replay) contract possible?

  #1 (permalink)
 
rpm123's Avatar
 rpm123 
Green Bay WI
 
Experience: Intermediate
Platform: NT
Broker: AMP/CQG
Trading: 6E
Posts: 321 since Apr 2010
Thanks Given: 337
Thanks Received: 466

I've played with a number of bots, mostly simple SAR ones that do not make money, but they still show a positive # of ticks on a high 80% of trades before moving adversely. I.e., very few trades are entered at the top or bottom of the move (except in the worst chop). So naturally I add a target and stop loss to catch the initial surge and limit my downside. But then, of course, the simple algo increases the total number of trades, and I am worse off than I started.

So my question is, can a bot have that first contract not actually trade live (or replay), but be used as a signal to the second contract to enter live (replay), the second contract having the stop loss/target requirements on it, but the second contract, after closing out, would not take another action, until the first contract signaled it again?

Is this a common mis-perception of trade analysis or am I on to something here?

Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
How to apply profiles
Traders Hideout
Cheap historycal L1 data for stocks
Stocks and ETFs
MC PL editor upgrade
MultiCharts
Trade idea based off three indicators.
Traders Hideout
NexusFi Journal Challenge - May 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
What is Markets Chat (markets.chat) real-time trading ro …
72 thanks
Spoo-nalysis ES e-mini futures S&P 500
55 thanks
Just another trading journal: PA, Wyckoff & Trends
27 thanks
Bigger Wins or Fewer Losses?
24 thanks
The Program
16 thanks
  #3 (permalink)
 
rpm123's Avatar
 rpm123 
Green Bay WI
 
Experience: Intermediate
Platform: NT
Broker: AMP/CQG
Trading: 6E
Posts: 321 since Apr 2010
Thanks Given: 337
Thanks Received: 466


Here's a picture of a bad patch of trades, that 8 out of 10 could have been profitable with a 5 tick PT and a 10 tick Stop. But building that in increases the number of trades.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #4 (permalink)
 
rpm123's Avatar
 rpm123 
Green Bay WI
 
Experience: Intermediate
Platform: NT
Broker: AMP/CQG
Trading: 6E
Posts: 321 since Apr 2010
Thanks Given: 337
Thanks Received: 466

So the final two columns in this trade list assumes all trades that did not reach $50 took a $100 loss. And all the winners just took $50.

It turns a -$4162 month into a positive $1800 month. With a much more livable Draw down.

This is a a simple SAR strategy based on the MACD average line turning red/green and entering appropriately. Nothing fancy.

Attached Files
Elite Membership required to download: NinjaTrader Trade List, 9_17_2012 - 10_12_2012.xls
Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #5 (permalink)
 vegasfoster 
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
Posts: 1,145 since Feb 2010
Thanks Given: 304
Thanks Received: 844

I do it in Sierra Chart, so I'm pretty sure you can do it in Ninja. I just create a separate calculation with a virtual position using natural entries and exits and control the units with a series of if statements then make my entry the same as the virtual entry but exit on fixed stops and targets.

For example something like,

//Virtual Position
If( PositionQuantity[0]<4 && EMA1[0]>EMA2[0] && EMA1[1]<EMA2[1] )
{
PositionQuantity[0] = PositionQuantity[1] + 1;
}

else if( PositionQuantity[0]>-4 && EMA1<EMA2 ) && EMA1[1]>EMA2[1] )
{
PositionQuantity[0] = PositionQuantity[1] - 1;
}

else
{
PositionQuantity[0] = PositionQuantity[1];
}


//Live Position
If(PositionQuantity[0] > PositionQuantity[1])
{
Buy 1 Unit;
Stop = Entry price minus 5 ticks;
Target = Entry price plus 10 ticks;
}

If(PositionQuantity[0] < PositionQuantity[1])
{
Sell 1 Unit;
Stop = Entry price plus 5 ticks;
Target = Entry price minus 10 ticks;
}

Reply With Quote
Thanked by:
  #6 (permalink)
 
rpm123's Avatar
 rpm123 
Green Bay WI
 
Experience: Intermediate
Platform: NT
Broker: AMP/CQG
Trading: 6E
Posts: 321 since Apr 2010
Thanks Given: 337
Thanks Received: 466

thanks @vegasfoster,

I build with strategy wizard on NT. Slowly trying to learn programming.

Attached is my simple MACD SAR strategy file. It uses MACDBBLinesV4.

If anyone could take a crack and add code to this, and post it back, it would seriously satisfy my curiosity.

Thank you in advance. -Patrick

Attached Files
Elite Membership required to download: rpmMACDEMA.cs
Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #7 (permalink)
 
serac's Avatar
 serac 
Arizona, USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: MB Trading
Trading: Cello
Posts: 116 since Jan 2011
Thanks Given: 321
Thanks Received: 138

I have sort of done this. My development stuff tests its own performance using "internal trades." I wanted to be able to invoke OnBarUpdate from within the strategy without potentially actually initiating a trade.

Far from elegant, I ended up creating algorithms parallel to the commonly-called structures in NT (such as Performance and Position). In NT you have Position.MarketPosition types. Essentially, I added a new type myInternalPositon.myInternalPosition type that declares Flat, Long, and Shrot positions for the internal/virtual trades. Doing this, writing stop and target catch logic for the internal trades, and writing a wrapper around OnBarUpdate enables the strategy to backtest and optimize itself.

With the same logic, you could by default operate in the internal/virtual mode. Once you hit a certain success criteria, you could automatically switch on for real.

You can do it in NT, it just is not elegant.

Reply With Quote
Thanked by:
  #8 (permalink)
 
MrYou's Avatar
 MrYou 
NC, USA
 
Experience: None
Platform: None Yet
Trading: Guitar
Posts: 403 since Jun 2011
Thanks Given: 618
Thanks Received: 196

I can do this using one strategy as a "master trader" placing sim trades and another as the "slave trader" placing sim or live trades. So for every strategy you would have two running at once, one controlling the other.

If anyone is interested PM me to discuss payment.

Reply With Quote
Thanked by:




Last Updated on October 15, 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 - Downloads - Top
no new posts