NexusFi: Find Your Edge


Home Menu

 





Need help decreasing number of 'placeholder' trades in strategy


Discussion in NinjaTrader

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




 
Search this Thread

Need help decreasing number of 'placeholder' trades in strategy

  #1 (permalink)
 Jeddy197 
Spartanburg, SC, US
 
Experience: Intermediate
Platform: Ninjatrader, MT4
Trading: Forex
Posts: 7 since Jul 2013
Thanks Given: 4
Thanks Received: 1

I've been running a strategy for a few weeks, which seems to be doing well, but I'd like to further that by decreasing the commissions I'm paying. My code uses order management similar to an example video made by BigMike, so I will reference his example/template for simplicity's sake.

Here is his video illustrating the strategy:

And here is the actual code: MyMoneyMaker_BigMike.zip

Upon entry, my strategy opens 3 separate long orders. These 3 orders are managed separately, with their own SL, TP, and breakeven point. The first two orders ("target1" & "target2") are opened with extremely small lot sizes, and are essentially there just to serve as a breakeven point for "target3", which carries the majority of the trade size.

The reason I have done it this way is it's the most effective way I could incorporate dynamic trailing stops and profit triggers. It works great, but since "target1" and "target2" are effectively just placeholders, it would be nice if I could alter this method so I didn't actually have to trade target1 and target2 (this avoiding commissions). So does anyone have experience trading a similar method, but avoiding having to enter "placeholder" trades?

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
PowerLanguage & EasyLanguage. How to get the platfor …
EasyLanguage Programming
Trade idea based off three indicators.
Traders Hideout
MC PL editor upgrade
MultiCharts
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Tao te Trade: way of the WLD
24 thanks
Just another trading journal: PA, Wyckoff & Trends
24 thanks
Bigger Wins or Fewer Losses?
21 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #3 (permalink)
 Dbjergins 
Joaquin Texas
 
Posts: 8 since May 2015



Jeddy197 View Post
I've been running a strategy for a few weeks, which seems to be doing well, but I'd like to further that by decreasing the commissions I'm paying. My code uses order management similar to an example video made by BigMike, so I will reference his example/template for simplicity's sake.

Here is his video illustrating the strategy:

And here is the actual code: Attachment 183426

Upon entry, my strategy opens 3 separate long orders. These 3 orders are managed separately, with their own SL, TP, and breakeven point. The first two orders ("target1" & "target2") are opened with extremely small lot sizes, and are essentially there just to serve as a breakeven point for "target3", which carries the majority of the trade size.

The reason I have done it this way is it's the most effective way I could incorporate dynamic trailing stops and profit triggers. It works great, but since "target1" and "target2" are effectively just placeholders, it would be nice if I could alter this method so I didn't actually have to trade target1 and target2 (this avoiding commissions). So does anyone have experience trading a similar method, but avoiding having to enter "placeholder" trades?


If I'm understanding correctly you use target 1 & 2 to trigger or have a value for use with your trailing stop. Thinkorswim works in the same way. What I did was this:

def crossAbove = price[1] crosses above Avg[1] and price[1] crosses above ValueHi + entry_price ;
This is the criteria that fires my buy order it is simply true of false

I then use this to create a separate order for my trailing stop i.e-
def trigger = if crossabove then 1 else 0;
def orderprice = close;
rec ts = if trigger then orderprice - trailstop else if low - trailstop > ts[1] then low - trailstop else ts[1];
def stopout = if trigger then 0 else if low <= ts then 1 else 0;
AddOrder(OrderType.SELL_TO_CLOSE, stopout, ts, name = "Trailing_Stop");


It's mostly about where you point your variables. If you need to discuss this further let me know.

Regards,
David

Reply With Quote




Last Updated on June 8, 2015


© 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