NexusFi: Find Your Edge


Home Menu

 





Daily maximum target for Multiple trades


Discussion in NinjaTrader

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




 
Search this Thread

Daily maximum target for Multiple trades

  #1 (permalink)
 
scartree's Avatar
 scartree 
Queensland Australia
 
Experience: Intermediate
Platform: NinjaTrader, Metatrader
Broker: Mirus Futures/Zen-Fire
Trading: 6E, ES, FESX, Forex
Posts: 63 since Sep 2009
Thanks Given: 63
Thanks Received: 79

I am learning to code a very simple strategy in Ninjascript for NT7. There are a couple of things with which I am having difficulty. The first is coding a user defined trailing stop. I have been searching for a strategy which has this feature and I am sure I will find it but help here would be appreciated.

The other is a more difficult task and despite my efforts I have been frustrated. I am applying my strategy to several charts, each with a different stock index. (I hope it will also work with bonds, commodities, etc). Having each index trade the strategy is working well. My first objective is to code a daily total TP or SL in each chart which will prevent further trades in that index for that day.

More challenging is to build a daily total TP or SL which will close all charts from further trades for that day. There are very good multi chart managers in Forex Factory but I do not know if such a script or manager exists or can be built for NT7.

Any help or leads would be very welcome. Thanks

Karl

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NexusFi Journal Challenge - April 2024
Feedback and Announcements
ZombieSqueeze
Platforms and Indicators
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Request for MACD with option to use different MAs for fa …
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
67 thanks
Battlestations: Show us your trading desks!
48 thanks
NexusFi site changelog and issues/problem reporting
47 thanks
GFIs1 1 DAX trade per day journal
32 thanks
What percentage per day is possible? [Poll]
31 thanks

  #3 (permalink)
 Xeno 
UK
 
Experience: Intermediate
Platform: Ninja
Broker: Mirus/Zen
Trading: Futures - bonds, currencies, index
Posts: 288 since Oct 2010
Thanks Given: 70
Thanks Received: 274


Try a seperate strategy with

 
Code
AccountValue = GetAccountValue(AccountItem.CashValue)+GetAccountValue(AccountItem.InitialMargin);
AccountRealised = GetAccountValue(AccountItem.RealizedProfitLoss);
If the realised or value gets to your level, call

 
Code
NinjaTrader.Gui.SuperDom.SuperDom.FlattenEverything();
I think that last call might be unsupported. Alternatively, write a flag to a file and have each strat pick it up and close gracefully.

Reply With Quote
The following user says Thank You to Xeno for this post:





Last Updated on December 21, 2010


© 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