Prevent opening new trades if existing trade exist

Moderator: admin

Prevent opening new trades if existing trade exist

Postby Juanita » Mon Jan 16, 2017 10:29 am

Hello, thanks for a great site!

So I'm struggling with this snippet and valuemap.BuySell ~= "B" in this block of code:

if core.crossesOver(FMADATA, 1.05100, p - FMASHIFT)
and valuemap.BuySell ~= "B"
then enter("B"); -- enter long trade
end


Logic: if ema is equal to value 1.05100 and no existing open buy trade exists, then open buy trade.


(not sure what argument to put so I've put in and valuemap.BuySell ~= "B" but it isn't working, go figure) everything else works.
Juanita
 
Posts: 1
Joined: Mon Jan 16, 2017 10:06 am

Return to Indicator Development

Who is online

Users browsing this forum: No registered users and 9 guests