Pre / Post Increment Operands - NinjaTrader | futures io social day trading
futures io futures trading


Pre / Post Increment Operands
Updated: Views / Replies:514 / 4
Created: by resirca52009 Attachments:1

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Pre / Post Increment Operands

  #1 (permalink)
Elite Member
Indianapolis, Indiana/ USA
 
Futures Experience: Advanced
Platform: MT4, Ninjatrader
Broker/Data: AMP / CQG
Favorite Futures: Futures
 
Posts: 45 since Oct 2012
Thanks: 110 given, 13 received

Pre / Post Increment Operands

What I am trying to do in plain English is make the ATR profit target " dynamic " by
" incrementalizing " it. See code snippett below :

So, currently mFactor A / B = static values. Which means they have a stationary value based on whether or not the ATR value is above or below the benchmark value of .25. The ATR value is determined by the price, so as price goes up or down the ATR value will change correspondingly in turn causing the mFactor to change BUT ONLY if it goes ABOVE or goes BELOW the .25 value. What I am attempting to do is have the mFactor change ( increment or de increment if you will ) along with the change in the ATR value.

So, let's say for every five points of the declining ATR value the mFactor increases by 1 point. Or for every one point of ATR decline the mFactor increases by one point....hopefully this make sense.

mFactorA = ATR(14)[0];
mFactorB = ATR(14)[0];


if (mFactorA > .25 + + // AS THIS .25 VALUE INCREMENTS BY ONE
&& Open[0] <= ATRPREDICTOR2(2, 10, 3).Upper[0]
&& High[3] > High[2] // SHORT
&& High[2] > High[1])

if (mFactorB < .25 - - // AS THIS .25 VALUE DE INCREMENTS BY ONE
&& Open[0] <= ATRPREDICTOR2(2, 10, 3).Upper[0]
&& High[3] > High[2] // SHORT
&& High[2] > High[1])

{
EnterShort(DefaultQuantity, "Condition 7A Entry");
DrawDiamond("Sell Order Diamond # 7" + CurrentBar, true, 0, High[0] + 75 * TickSize, Color.Green);
mFactorA=((ATR(14)[0]/TickSize)* - - 2 ); // THEN THE 2 VALUE DE INCREMENTS BY ONE
SetProfitTarget("Condition 7A Entry", CalculationMode.Ticks,mFactorA);
}

{
EnterShort(DefaultQuantity, "Condition 7B Entry");
DrawDiamond("Sell Order Diamond # 7" + CurrentBar, true, 0, High[0] + 75 * TickSize, Color.PaleGreen);
mFactorB=((ATR(14)[0]/TickSize)* + + 3 ); // THEN THE 3 VALUE INCREMENTS BY ONE
SetProfitTarget("Condition 7B Entry", CalculationMode.Ticks,mFactorB);
}

Thanks,
Richard

Reply With Quote
 
  #2 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,494 since Sep 2013
Thanks: 1,705 given, 3,700 received
Forum Reputation: Legendary

Answer
This post has been selected as an answer to the original posters question Answer


resirca52009 View Post
What I am trying to do in plain English is make the ATR profit target " dynamic " by
" incrementalizing " it. See code snippett below :

So, currently mFactor A / B = static values. Which means they have a stationary value based on whether or not the ATR value is above or below the benchmark value of .25. The ATR value is determined by the price, so as price goes up or down the ATR value will change correspondingly in turn causing the mFactor to change BUT ONLY if it goes ABOVE or goes BELOW the .25 value. What I am attempting to do is have the mFactor change ( increment or de increment if you will ) along with the change in the ATR value.

So, let's say for every five points of the declining ATR value the mFactor increases by 1 point. Or for every one point of ATR decline the mFactor increases by one point....hopefully this make sense.

mFactorA = ATR(14)[0];
mFactorB = ATR(14)[0];


if (mFactorA > .25 + + // AS THIS .25 VALUE INCREMENTS BY ONE
&& Open[0] <= ATRPREDICTOR2(2, 10, 3).Upper[0]
&& High[3] > High[2] // SHORT
&& High[2] > High[1])

if (mFactorB < .25 - - // AS THIS .25 VALUE DE INCREMENTS BY ONE
&& Open[0] <= ATRPREDICTOR2(2, 10, 3).Upper[0]
&& High[3] > High[2] // SHORT
&& High[2] > High[1])

{
EnterShort(DefaultQuantity, "Condition 7A Entry");
DrawDiamond("Sell Order Diamond # 7" + CurrentBar, true, 0, High[0] + 75 * TickSize, Color.Green);
mFactorA=((ATR(14)[0]/TickSize)* - - 2 ); // THEN THE 2 VALUE DE INCREMENTS BY ONE
SetProfitTarget("Condition 7A Entry", CalculationMode.Ticks,mFactorA);
}

{
EnterShort(DefaultQuantity, "Condition 7B Entry");
DrawDiamond("Sell Order Diamond # 7" + CurrentBar, true, 0, High[0] + 75 * TickSize, Color.PaleGreen);
mFactorB=((ATR(14)[0]/TickSize)* + + 3 ); // THEN THE 3 VALUE INCREMENTS BY ONE
SetProfitTarget("Condition 7B Entry", CalculationMode.Ticks,mFactorB);
}

Thanks,
Richard

You would need to used the increment / decrement operators on variables, not on constants.

Reply With Quote
The following user says Thank You to rleplae for this post:
 
  #3 (permalink)
Elite Member
Indianapolis, Indiana/ USA
 
Futures Experience: Advanced
Platform: MT4, Ninjatrader
Broker/Data: AMP / CQG
Favorite Futures: Futures
 
Posts: 45 since Oct 2012
Thanks: 110 given, 13 received



rleplae View Post
You would need to used the increment / decrement operators on variables, not on constants.

rleplae,

Again, thanks for your reply. Could you offer an example ? A link, a document, any other resources ? I have been researching random walk with drift theory, maximal curves, continuous stochastic processes, measure & integration, probabilities and discrete intervals in an attempt to find a way to achieve my goal here of having a dynamic stop loss and dynamic profit target. The one I currently use is somewhat dynamic but it could be much better. My goal is to have my stop loss and profit target "move and calculate" with the recent past ( say, the past 30 - 15 minute bars ) as well as the current price. I am basically trying to calculate volatility on a minute by minute basis and adjust my stop loss and profit target accordingly......say, in 15 minute intervals, if that happens to be the time frame that I am trading from.

Thanks,
Richard

Reply With Quote
 
  #4 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,494 since Sep 2013
Thanks: 1,705 given, 3,700 received
Forum Reputation: Legendary


resirca52009 View Post
rleplae,

Again, thanks for your reply. Could you offer an example ? A link, a document, any other resources ?

Thanks,
Richard

In the attached file you will find examples where stop and target is dynamically moved...

good luck !

Attached Files
Register to download File Type: cs AlphaTradingMethodRonV36.cs (86.2 KB, 12 views)
Reply With Quote
The following user says Thank You to rleplae for this post:
 
  #5 (permalink)
Elite Member
Indianapolis, Indiana/ USA
 
Futures Experience: Advanced
Platform: MT4, Ninjatrader
Broker/Data: AMP / CQG
Favorite Futures: Futures
 
Posts: 45 since Oct 2012
Thanks: 110 given, 13 received

Thanks for the code example ! I'll spend some time reviewing.....

Reply With Quote

Reply



futures io > > > > Pre / Post Increment Operands

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
journal stats: pre- vs post-commission djarum11 The Elite Circle 1 May 18th, 2015 03:20 AM
Penny Increment Options..... mdsvtr Options on Futures 3 February 21st, 2015 02:01 PM
Delta Increment Based Volume Ladder Bars gsiencze99 NinjaTrader 0 December 2nd, 2014 10:53 PM
Removing Pre/post market data form monkey bars? Yakito ThinkOrSwim 3 November 5th, 2013 01:38 PM
Code to increment every two hours. onava EasyLanguage Programming 6 May 12th, 2013 06:11 PM


All times are GMT -4. The time now is 11:28 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-14 in 0.12 seconds with 30 queries on phoenix via your IP 54.227.51.103