NexusFi: Find Your Edge


Home Menu

 





setbreakeven@ multicharts


Discussion in MultiCharts

Updated
    1. trending_up 2,207 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
shy01
Hong kong
 
Posts: 1 since Mar 2020
Thanks Given: 0
Thanks Received: 1

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.

thank you


Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Pakistan Mediator in Tehran as Hormuz Normalization Coll …
Prediction Markets & Event Contracts
Rubios Good News Within Hours and the 30-Day Math: Why H …
Prediction Markets & Event Contracts
SEC Advisory Committee Backs Tokenized Securities Exempt …
Traders Hideout
$24.5 Billion Record Month: Prediction Markets Shatter A …
Prediction Markets & Event Contracts
Powell in 48 Hours: Word Markets Give 78% on Inflation, …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
The Pivot Point 113.6³ — Navigating the Prediction of …
26 thanks
Sober Journey With S&P
17 thanks
The Confluence Meter: A Multi-Layered Signal Framework B …
11 thanks
NT8 color choices
10 thanks
Volume Indicators
7 thanks
  #2 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
Systematic Algo Trader
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,270 since Feb 2017
Thanks Given: 2,960
Thanks Received: 2,856

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):

 
Code
// Calculate the value of 1 tick/point and multiply by 2 to account for bid/ask difference on exit

SetBreakEven((MinMove / PriceScale * BigPointValue) * 2 ) ;
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.

~vmodus


Follow me on X Visit my NexusFi Trade Journal Reply With Quote




Last Updated on March 4, 2020


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts