NexusFi: Find Your Edge


Home Menu

 





strategy development


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one kavin729 with 6 posts (0 thanks)
    2. looks_two bill897 with 3 posts (3 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 MotoMoto with 1 posts (1 thanks)
      Best Posters
    1. looks_one bill897 with 1 thanks per post
    2. looks_two Trader.Jon with 1 thanks per post
    3. looks_3 DavidHP with 1 thanks per post
    4. looks_4 MotoMoto with 1 thanks per post
    1. trending_up 6,868 views
    2. thumb_up 6 thanks given
    3. group 5 followers
    1. forum 14 posts
    2. attach_file 4 attachments




 
Search this Thread

strategy development

  #11 (permalink)
 bill897 
U.S.A.
 
Experience: Advanced
Platform: NinjaTrader
Posts: 19 since May 2010
Thanks Given: 5
Thanks Received: 11

Anyone familiar with the Android website SampleATMstrategyCANCEL.cs - autostrats - Project Hosting on Google Code ?

What I did is add some of Kavin's code to this ATM Strategy. If you see any errors please note a correction. It
looks like to me, people are using their Google Cell phones to trade with. I would think they would use GOTOMY
COMPUTER.COM and get into their desktop or server and trade. The power of these mobile cell phones is going up. Does anyone know of anyone who is trading using their mobile phone and they have NT7.0 on their cell phone and their using ATM to trade? I know you can get up to probably 8 gigs of extra memory. Would an Android be faster then an IPhone? What if you have a dropped connection? I'd think if I could use a laptop and go to my PC and trade, but you'ld have to make sure no one was watching you put in your password.

Here's the Android Code with some of Kavin's code changes added (TF_long_3W_3BR and TF_short_3W_3BR would be templates you would save out there that would control your stops, targets, auto trail, Breakeven,
auto trail strategies) as follows:

Attached Thumbnails
Click image for larger version

Name:	bg_Main.jpg
Views:	104
Size:	540.1 KB
ID:	26682  
Attached Files
Elite Membership required to download: atm2.cs
Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
How to apply profiles
Traders Hideout
ZombieSqueeze
Platforms and Indicators
REcommedations for programming help
Sierra Chart
MC PL editor upgrade
MultiCharts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
31 thanks
Spoo-nalysis ES e-mini futures S&P 500
28 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
20 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #12 (permalink)
 
mrticks's Avatar
 mrticks 
Dublin, Ireland.
 
Experience: Advanced
Platform: NinjaTrader, TOS, Multicharts, Open Source various
Trading: FDAX, cable/yen, FX, options on commodities
Posts: 67 since Jun 2009
Thanks Given: 16
Thanks Received: 10


bill897 View Post
Anyone familiar with the Android website SampleATMstrategyCANCEL.cs - autostrats - Project Hosting on Google Code ?

What I did is add some of Kavin's code to this ATM Strategy. If you see any errors please note a correction. It
looks like to me, people are using their Google Cell phones to trade with. I would think they would use GOTOMY
COMPUTER.COM and get into their desktop or server and trade. The power of these mobile cell phones is going up. Does anyone know of anyone who is trading using their mobile phone and they have NT7.0 on their cell phone and their using ATM to trade? I know you can get up to probably 8 gigs of extra memory. Would an Android be faster then an IPhone? What if you have a dropped connection? I'd think if I could use a laptop and go to my PC and trade, but you'ld have to make sure no one was watching you put in your password.

Here's the Android Code with some of Kavin's code changes added (TF_long_3W_3BR and TF_short_3W_3BR would be templates you would save out there that would control your stops, targets, auto trail, Breakeven,
auto trail strategies) as follows:

I put that code up on Google to save out my daily strat code changes but since moved to subversion. Did you get anywhere with it or I could I help with something?

Reply With Quote
  #13 (permalink)
kavin729
 
Posts: 8 since Jan 2010
Thanks Given: 8
Thanks Received: 0


Hi I want to place stoploss below current day open for long trade,and above current day open for short tradeI get error
"Operator"-" cannot be applied to operands of type "Ninja Trader .Data.DataSeries"and "double
error code NT0019
??

HTML Code:
private void GoLong()
		{
			SetStopLoss("target1", CalculationMode.Price, CurrentDayOHL().CurrentOpen - (Stop*TickSize), false);
			SetStopLoss("target2", CalculationMode.Price,CurrentDayOHL().CurrentOpen - (Stop*TickSize), false);
			SetStopLoss("target3", CalculationMode.Price, CurrentDayOHL().CurrentOpen - (Stop*TickSize), false);
			
			SetProfitTarget("target1", CalculationMode.Price, Close[0] + (Target1*TickSize));
			SetProfitTarget("target2", CalculationMode.Price, Close[0] + ((Target1+Target2)*TickSize));
			SetProfitTarget("target3", CalculationMode.Price, Close[0] + ((Target1+Target2+Target3)*TickSize));
			
			EnterLong("target1");
			EnterLong("target2");
			EnterLong("target3");
			
			
		}
		private void GoShort()
		{
			SetStopLoss("target1", CalculationMode.Price, CurrentDayOHL().CurrentOpen + (Stop*TickSize), false);
			SetStopLoss("target2", CalculationMode.Price, CurrentDayOHL().CurrentOpen + (Stop*TickSize), false);
			SetStopLoss("target3", CalculationMode.Price, CurrentDayOHL().CurrentOpen + (Stop*TickSize), false);
			
			SetProfitTarget("target1", CalculationMode.Price, Close[0] - (Target1*TickSize));
			SetProfitTarget("target2", CalculationMode.Price, Close[0] - ((Target1+Target2)*TickSize));
			SetProfitTarget("target3", CalculationMode.Price, Close[0] - ((Target1+Target2+Target3)*TickSize));
			
			EnterShort("target1");
			EnterShort("target2");
			EnterShort("target3");
			
			
		}

Reply With Quote
  #14 (permalink)
kavin729
 
Posts: 8 since Jan 2010
Thanks Given: 8
Thanks Received: 0

Hi as per condition i am getting Dots at the correct bars why am i getting long signal on the next bar

HTML Code:
  protected override void OnBarUpdate()
       {
// Condition set 1
            if (Close[1] > CurrentDayOHL().CurrentOpen[0]
				&& Close[1]>Open[1]
				&& High[0]>Open[0]
                && High[0] > High[1])
            {
               Print("");
				DrawDot("My Dot"+ CurrentBar,false,0,High[0],Color.Blue);
               EnterLong();
            }

            // Condition set 2
           if (Close[1] < CurrentDayOHL().CurrentOpen[0]
				&& Close[1]<Open[1]
				&& Low[0]<Open[0]
               && Low[0] < Low[1])
            {
                Print("");
				DrawDot("My Dot"+ CurrentBar,false,0,Low[0],Color.Red);
                EnterShort();
            }
        }

Reply With Quote
  #15 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,611 since Aug 2009
Thanks Given: 11,336
Thanks Received: 2,744


kavin729 View Post
Hi as per condition i am getting Dots at the correct bars why am i getting long signal on the next bar


Probably because the strategy is set to Calculate On Bar Close.

Most people think they can get a signal and get an entry on the same bar.
This causes a lot of frustration to new traders.

In real time trading, this is seldom possible.
Most indicators/strategies calculate on bar close which means the price has moved.

Also, when a signal occurs, there is a spread.
Either the bid or ask is not at the signal price.
A 'real time' fill at the signal price is not usually possible after the signal.

Price is seldom stagnant.
(if it was, would you trade it?)

Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Follow me on Twitter Reply With Quote
Thanked by:




Last Updated on May 6, 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