Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
hi everyone, i am new to this forum, i am recently start learning power language for multicharts. i would like to ask about setbreakeven . as i read the user manual that the setbreakeven are not including the commissions.
is that any coding method that can be done for this situation?
for trading the futures in auto mode, let say i have already open a position buy order at price of 20000 and the mini movement is one 1 tick ( so the next price will be 20001 )
i want to code the script like this:
when the price move to 20010 or reach the profit which equal to 10 ticks and i want to set a break even stop at 20001.
( the commissions will be cost 1 tick to cover . )
how can i write the script for this ? i hope i have describe the situation correctly.
I don't use MultiCharts, but rather TradeStation, which uses EasyLanguage. EasyLanguage and PowerLanguage are supposed to be the same, however you will need to test and very this on your own.
Here is the code (which should work...give it a try):
You may have a few problems with this approach:
Total Transaction Cost: I caution you that commission is not the only thing to consider. Depending on your exchange, you may have clearing or other fees. In the US, I have NFA and clearing fees, so I always include these fees (commission + NFA + Clearing). I use USD$5, which covers both entry and exit (roundtrip). Make sure that one tick/point is large enough to cover these fees.
Slippage: If you are placing market orders, you already have at least one tick/point slippage between bid and ask price. That is why the code multiplies the $ amount by 2. In a volatile market, slippage maybe greater.
Retracement: if the price retraces back towards your original entry price, you will get stopped by your breakeven. This will probably happen at least 50% of the time, and probably a lot more. So you may want to include an 'IF' statement to only SetBreakEven after the price moves away from entry.
I suspect that you might have trouble with this at is written. You will need to do plenty of testing. Anyhow, test the code in MultiCharts and let me know if this works.