how can i search the current pair name if it contains "JPY" and if found, use 100. if not use 10000. ?
Latest posts made by jivetrader
-
RE: MAE maximum adverse excursionposted in Questions & Answers
-
RE: MAE maximum adverse excursionposted in Questions & Answers
thanks, i am using the slide-out variables now. this eliminates an extra Modify Variables block for me.
can you help with the conversion from price format to #pips e.g. .0031 to 31pips, so that it works for regular and JPY pairs?
-
RE: MAE maximum adverse excursionposted in Questions & Answers
could you post a link to a page that explains how that slide-out Variables box works? i still don't get it.
-
RE: MAE maximum adverse excursionposted in Questions & Answers
let's take MFE maximum favorable excursion - the max number of pips price has moved IN FAVOR of the trade, during the trade, ie. the most $ you could have made with supernatural timing - for LONG trades:
i can see a couple of ways to do this now, neither involves the Pips from Open block, which only passes if the trade is a specified number of pips from the open price of the trade. since we are trying to find the number of pips we are from this open we can either:
- compare the current bid to the trade's open price in a loop until trade is closed
- at close of trade, find the highest high since a specified bar or since a specified time (Formula block>Market Properties). [but how to identify the exact entry time is beyond me at this point]
i don't know how to post the code but this is working:
define project variables
MFE=0
MFEtemp=05 steps in sequence:
- IF TRADE IS RUNNING, type: Buys
- if bid > Trade/Order in Loop, Open Price (level) then (CONDITION)
- MFEtemp = Bid - Trade/Order in Loop, Open Price (level) (FUNCTION)
- if MFEtemp > MFE then (CONDITION)
- MFE = MFEtemp (MODIFY VARIABLES)
MFE result is shown as a price level and needs conversion to pips. e.g. .0031 for 31 pips on a USD pair
variables will reset upon next trade entry and start again. so upon close of trade, i want to store this value to an .xls
also if anyone knows how to convert from price format to #pips for both Western and JPY pairs, i'd love to know
cheers -
RE: MAE maximum adverse excursionposted in Questions & Answers
ok, i just found the Modify Variables block.
so i just need to know how to configure the Pips Away block. what is the 'Pips away' field- is this where you store the value into a variable? the Help is a little cryptic
thank you
-
RE: MAE maximum adverse excursionposted in Questions & Answers
could you explain the Pips away from open module in detail please.
the help says: "Use this block to check how far from the open-price (of the currently loaded trade/order) the current market price is. It works with trades or orders."
Direction mode: Trading model, double-sided, or chart model - please explain. these options do not seem to affect the block parameters
Pips Away mode: fixed value, % of SL, % of TP, dynamic (pips)once a bar, i want to compare the Pips from Open from the last time it was compared to the open. if it is greater, update the variable. if not, ignore it.
how do i store the current Pips away value, compare it, and update the value if necesssary?
thanks -
RE: MAE maximum adverse excursionposted in Questions & Answers
maybe something like this: if trade is running > pips away from open price > compare to previous value? if higher, store in a variable > at trade close, write variable to an excel file.
i just need help with the question mark part

-
RE: MAE maximum adverse excursionposted in Questions & Answers
for longs, i would like to find the the lowest price dropped during a trade (MAE)
and the highest price reached during a trade (MFE)
any help with this is appreciated thanks
-
RE: negative variablesposted in Questions & Answers
yes, your code is like my workaround (which works). but when my Project Variable is simply set to -1, it doesn't work. i have to make the PV +1 and use the Adjust *-1 as you did in order for it to work.
-
RE: negative variablesposted in Questions & Answers
i just discovered that Project Variables cannot be negative. or at least it seems that way.
my entry Condition uses a custom indicator that references a Project Variable, and as soon as i flipped the variable positive, and used the ADJUST field *-1, my entry now works.