Search found 7 matches

by Erik1966
11 Dec 2014
Forum: MultiCharts
Topic: How to get a value for an ATR stop?
Replies: 14
Views: 1637

Re: How to get a value for an ATR stop?

Hi ABC and TJ, This is a part of the code. It's my first code ever so i am curious what your findings are. :: Regards, Erik Have you read and understood my post #10 ? TJ, Yes i did read your post and learned that IntrabarOrderGeneration is a global statement. I had removed most entryrules but forgo...
by Erik1966
11 Dec 2014
Forum: MultiCharts
Topic: How to get a value for an ATR stop?
Replies: 14
Views: 1637

Re: How to get a value for an ATR stop?

Hi ABC and TJ, This is a part of the code. It's my first code ever so i am curious what your findings are. [IntrabarOrderGeneration = false ] Inputs: Length ( 20 ), atrlength(14), NumATRs( 1 ); value1= entryprice - averagetruerange (atrlength)*NumATRs ; value2= entryprice + averagetruerange (atrleng...
by Erik1966
11 Dec 2014
Forum: MultiCharts
Topic: How to get a value for an ATR stop?
Replies: 14
Views: 1637

Re: How to get a value for an ATR stop?

ABC, Thank you for your input, - When do you want to send the order? Let's name this stoplossorder from now on. The stoplossorder must be send at the same time or direct after the entry. This is the entry: then begin sellshort ("rsisell") next bar open; end; What price should be used i.e. use the va...
by Erik1966
10 Dec 2014
Forum: MultiCharts
Topic: How to get a value for an ATR stop?
Replies: 14
Views: 1637

Re: How to get a value for an ATR stop?

Erik1966, declare a variable and make it intrabarpersist to store the value of your stop price instead of using value2. Besides that use print statements in your code to print the values of the stop at each bar to the output. This way you can track down the values used in your code and know why the...
by Erik1966
09 Dec 2014
Forum: MultiCharts
Topic: How to get a value for an ATR stop?
Replies: 14
Views: 1637

Re: How to get a value for an ATR stop?

ABC,

When you look at my example the stop i want is 115 but the next bar can open at 118 or higher and my trade wil be closed at 118 or higher while my stop is 115.
I don't want to wait for the next bar.
So how can i set the stoploss at 115 using averagetruerange?

Regards,
Erik
by Erik1966
09 Dec 2014
Forum: MultiCharts
Topic: How to get a value for an ATR stop?
Replies: 14
Views: 1637

Re: How to get a value for an ATR stop?

Erik1966, how about using a stop order to accomplish what you have in mind? Something along the lines of: [IntrabarOrderGeneration=true] if marketposition = -1 then buytocover ("rsishortstop") next bar value2 stop ; Regards, ABC Hi ABC, Thank you for your reply. The buytocover is still at the begin...
by Erik1966
09 Dec 2014
Forum: MultiCharts
Topic: How to get a value for an ATR stop?
Replies: 14
Views: 1637

How to get a value for an ATR stop?

Hello, I am trying to get a limit stop order using averagetruerange in my signal. This is how i get the value: value1= entryprice - averagetruerange (atrlength)*NumATRs ; value2= entryprice + averagetruerange (atrlength)*NumATRs ; And this is how i currently use it in my signal: [IntrabarOrderGenera...

Go to advanced search