Is this possible to do? - MultiCharts | futures io social day trading
futures io futures trading


Is this possible to do?
Updated: Views / Replies:1,548 / 16
Created: by Gibban Attachments:0

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
 

Is this possible to do?

  #11 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

Gibban,

you need to either store the stop price when you compute the buy limit price and make sure it doesn't get updated any more while you are in a position. Something like this should work for you.
 
Code
//not long
if MarketPosition < 1 then
begin
         BuyLimitPrice = ...
         LongStopPrice = ...
end;
These values can update while you are either short of flat and as soon as you are long the values can't change anymore.

Regards,
ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #12 (permalink)
Elite Member
Stockholm
 
Futures Experience: Beginner
Platform: NinjaTrader, MultiCharts
Favorite Futures: Forex
 
Posts: 19 since Feb 2014
Thanks: 25 given, 4 received

Hello ABCTG!

I don't know if I understand you right, there is something that I am missing in the code!
Probably a lot, but this is my first lines of cod.

Regards
//G

 
Code
Input: {-------------------------------------------------------------------------------------}

RSIThreshold(10),
RSILookback(2),
ATRThreshold(10),
ATRBuyLimit(0.1),
ATRProfitTarget(1),
ATRStoploss(3),
DayExitPeriod(5);

Variables: {---------------------------------------------------------------------------------}
RSI_Value(0),
MA200(0),
ATR(0),
BuyLimitPrice(0),
StopLossPrice(0),
MP(0);

{=== START OF MAIN PROGRAM ==================================================================} 

RSI_Value = RSI(Close,RSILookback);
MA200 =  Average(Close, 200);
ATR =  AverageTrueRange(AtrThreshold);
MP = MarketPosition;
BuyLimitPrice = Close [1] - ATRBuyLimit [1] * ATR [1];
StopLossPrice = BuyLimitPrice - ATRStoploss [1]* ATR [1];

//SetupDay +1 = EntryDay
If ( RSI_Value <= RSIThreshold ) And ( Close > MA200 ) Then 
	Buy ("Long") next bar at (Close [1] - ATRBuyLimit * ATR ) limit;
	
//Target (OK)
If MP = 1 Then Sell ("LTarget") Next bar at (EntryPrice + (ATRProfitTarget * ATR)) Limit;
	
//ExitDays (OK)
If ( Barssinceentry = DayExitPeriod ) Then sell ("DayExitPeriod") this bar at close;

//Not Long
If MP < 1 then
begin
         BuyLimitPrice =  - ATRBuyLimit * ATR ;
         StopLossPrice =  BuyLimitPrice - ATRStoploss * ATR ;
end;

//StopLoss
If MP = 1 Then Sell ("SLoss") this bar at StopLossPrice limit;

Reply With Quote
 
  #13 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary


Gibban,

what does your code do, that you think you are missing something?
One thing I noticed is that your stop order is a limit order. As limit orders are executed at this price or better, a limit order to sell below the current market price will be filled right away.

Regards,
ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #14 (permalink)
Elite Member
Stockholm
 
Futures Experience: Beginner
Platform: NinjaTrader, MultiCharts
Favorite Futures: Forex
 
Posts: 19 since Feb 2014
Thanks: 25 given, 4 received

ABCTG,

I don't know witch options I have for the StopLoss function!

 
Code
//StopLoss
If MP = 1 Then Sell ("SLoss") this bar at StopLossPrice limit;
As you see the code now it do not compile!

/g

Reply With Quote
 
  #15 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

Gibban,

when starting out with learning EasyLanguage or PowerLanguage (or any other language for that matter) I would suggest not to jump into something complex like strategy development right away. Start with the basics and move forward step by step.

Regarding your code, the compiler points you to the issues and gives an idea about the solution in the Output tab. I don't have a function called AverageTrueRange within my PL Editor. This is the first error I am running into, so for the code to compile on my end this needs to be changed to the default AvgTrueRange function.
The next thing is that your limit order for the stop can't be used with the phrase "this bar" - the error message "'This bar' can only be used in close orders.", points you toward this. So you need to change it to "next bar" and for the order to be a stop order use "stop" instead of "limit". Change this and the code will compile fine.

Regards,
ABCTG

Reply With Quote
 
  #16 (permalink)
Elite Member
Stockholm
 
Futures Experience: Beginner
Platform: NinjaTrader, MultiCharts
Favorite Futures: Forex
 
Posts: 19 since Feb 2014
Thanks: 25 given, 4 received

Thank you ABCTG!

Yes you are right, I should not dig in to this!
But as I say this is my first signal and I did not realize how hard it was!!

I thought it was only couple of lines for this simple strategy, but I was wrong there.
Maybe I should give the code to a professional EL programmer, but then I had not learned anything.

At the moment the strategy is working with the StopLoss function, just a minor adjustments on the entry price. It is little bit to high.

Again thank you so much for your help!

Regards
Gibban

Reply With Quote
The following user says Thank You to Gibban for this post:
 
  #17 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

You are welcome. I have learned a lot from other coders when I started out, so a proper commented and written code by someone else can still help you making a lot of progress in your learning.
Forums are also a great source when you can get help with coding problems.

Regards,
ABCTG


Gibban View Post
I thought it was only couple of lines for this simple strategy, but I was wrong there.
Maybe I should give the code to a professional EL programmer, but then I had not learned anything.


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

Reply



futures io > > > > Is this possible to do?

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
     


All times are GMT -4. The time now is 11:37 PM.

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-17 in 0.10 seconds with 18 queries on phoenix via your IP 54.221.73.186