MultiCharts Autotrading question - EasyLanguage Programming | futures io social day trading
futures io futures trading


MultiCharts Autotrading question
Updated: Views / Replies:1,752 / 3
Created: by larssan 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
 

MultiCharts Autotrading question

  #1 (permalink)
Elite Member
Gothenburg, Sweden
 
Futures Experience: Advanced
Platform: MultiCharts
Broker/Data: Global Futures, MF Global
Favorite Futures: ES
 
Posts: 11 since Dec 2009
Thanks: 1 given, 2 received

MultiCharts Autotrading question

Hello,

I would like to start by saying thanks for a great forum as this is my first post.
I'm a mechanical trader from Sweden using MultiCharts.
So far I have traded manually but in order to learn more about programming I was thinking of automate my systems.
Some of it I figured out but now I've run in to some problems.

When using my "Backtesting" code for automatic trading I found lot of logical errors when the orders are executed.
I'm no experienced programmer so I try here to see if anyone can help me out.

 
Code
if marketposition = 1 and shorttrade1 = false then begin
        longtrade1 = true;
        lstp1 = InitialLongStop1 ;

        
            if UseMoveToBreakEven and h >= entryprice+BreakEvenFactor
            then begin
                lstp1 = MaxList(lstp1, entryprice);
                sell ("ExitLong1BE") from Entry ("Long1") next bar at lstp1 stop;
                end;    
                
            if UseTrailing and time >= TrailingStartTime and TrailLevel > lstp1
            then begin
                lstp1 = MaxList(lstp1, TrailLevel );
                sell ("ExitLong1 TRAIL") from Entry ("Long1") next bar at TrailLevel stop;
                end;    
            
            if time >= CloseTime then
                sell ("ExitLong1 EOD") from Entry ("Long1") this bar at c;
    
            if time < NoNewPositionsTime and shorttrade1 = false then begin
                sellshort ("Short2") 1 contract next bar at SellLevel stop;
                sstp2 = InitialShortStop2;
                BuyToCover ("InitExit Short2") from Entry ("Short2") next bar at sstp2 stop;
                    
            end;
The main problem is that to many orders are sent at the same time.

The problems I found so far:

1. If MarketPosition = 1 and UseTrailing = true
(I'm long and have a initial stop&reverse in the market and also using a trailing stop)
If the trailing stop level moves one tick above the initial stop level the trailing is active.
Now I have a stop order at the trailinglevel and a stop&reverse order one tick below.
The stop&reverse order is twice as big as my current position. (flat+short)
The problem i see is that if the market moves really fast I'll be flat at the trailing level and short twice the initial position at the stop&reverse level.
When I trade this manually I put in one order at the trailing level to make me flat and one order at the stop&reverse order to make me short.
I'll attach a pic to make it easier to understand what I mean. (It shows a short position but the issue is the same)
Auto Trading:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Manual Trading:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).



2. If MarketPosition = 1 and UseMoveToBreakEven = true
Basically same problem.

I'll try to explain the logic I'm looking for:
- If I'm long 1 contract I want to have a stop&reverse at a specified level below the entryprice.
(Flat and Short at the same level.)

- If I'm long 1 contract and using UseTrailing and the trailing stop is above the initial stop&reverse I want to Sell 1 contract at the trailing level and 1 contract at the initial stop&reverse level.
(Flat and Short at two different levels.)

- If I'm long 1 contract and using MoveToBreakEven and the BreakEven level is above the initial stop&reverse I want to Sell 1 contract at the BreakEven level and 1 contract at the initial stop&reverse level.
(Flat and Short at two different levels.)

- If I'm long 1 contract and using MoveToBreakEven and UseTrailing I want to sell 1 contract at the highest of the two and 1 contract at the initial stop&reverse level.
(Flat and Short at two different levels.)

Hope you understand what I'm trying to describe....

If anyone can give me some ideas I'd really appreciate it.

Thanks, Lars

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,354 given, 83,236 received


Let's take one at a time. Can you re-state item 1 again? I'm having a hard time following, although I must admit my eyes are so bad today (allergies) I can barely see the screen.

It seems like you are doing a bracket order breakout? (you mentioned reversing)?

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #4 (permalink)
Trading Apprentice
phoenix az
 
Futures Experience: Intermediate
Platform: tradestation
Favorite Futures: es
 
Nevi's Avatar
 
Posts: 4 since Aug 2011
Thanks: 0 given, 1 received

I don’t have multicharts, I use tradestation
Tradestation has a setting called “Wait for UR Out Confirmation” before it reverses direction.
Another setting is to only allow max 1 contracts at a time in each direction.

Without platform settings mentioned above implemented, orders as close as this could be a problem even in moderate trading conditions.

Another thing in your code is
h >= entryprice+BreakEvenFactor
If this is a trailing a long entry and the bar after entry is a very long bar, the high could pull the trail level up into the bar, stopping you out, long trailing is usually done from the low of the bar.
Nevi

Reply With Quote

Reply



futures io > > > > > MultiCharts Autotrading question

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
autotrading the eminishark journal sysot1t Trading Journals 31 July 12th, 2011 12:03 PM
Newbie Question about Autotrading (NT7) NJAMC The Elite Circle 3 April 6th, 2011 03:52 PM
How to set up autotrading using Multicharts? Doctor Leo MultiCharts 9 March 26th, 2011 12:35 PM
Question with arrays in MultiCharts Xyzzy EasyLanguage Programming 5 March 14th, 2011 08:52 AM
MultiCharts Bar Magnifier Question benharrell EasyLanguage Programming 2 January 11th, 2011 07:22 PM


All times are GMT -4. The time now is 01:11 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-16 in 0.64 seconds with 19 queries on phoenix via your IP 54.91.38.173