Hi can anyone help me with some basic coding?
Need to enter long at 0800 when price moves above high of last 3 hours or short position if price goes below last 3 hours.
Mid there anyway to increase your pip size automatically when your account reaches certain amounts?
Many Thanks
TC
This should work:
// example for H1 timeframe
//
MaxPrice = highest[3](high) //180 on a 1-minute timeframe (60 x 3)
MinPrice = lowest[3](low) //180 on a 1-minute timeframe (60 x 3)
IF (TIME = 080000) AND (close > MaxPrice) THEN
BUY 1 CONTRACT AT MARKET
ENDIF
IF (TIME = 080000) AND (close < MaxPrice) THEN
SELLSHORT AT MARKET
ENDIF
Hello,
Today was my first day trying to understand the prt platform for back testing and auto trading….I’ve never coded anything before so please be gentle.
In regards to the above breakout is it possible to set orders one or two pips above the high? From what I have read so far I can only see orders placed AT a above the high price.
I hope that makes sense.
Many thanks for any help.
MaxPrice and MinPrice variables in the example above are already made of recent highest/lowest price. If you want to add/subtract points to their values, you can add them as follows:
MaxPrice = highest[3](high) + 2*pointisze
MinPrice = lowest[3](low) -2*pointsize
Hope it helps.